-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 700 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use Python 3.11 Alpine image
FROM python:3.11-alpine
# Install SQLite
RUN apk --no-cache add sqlite
# Create a directory to store the database
RUN mkdir -p /app/data
# Set working directory to /app
WORKDIR /app
# Copy requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code into the container
COPY *.py .
# Copy the CSV into the container
COPY data/database.csv /app/data/database.csv
# Copy the entrypoint script and make it executable
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Expose the port for Uvicorn
EXPOSE 8000
# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]