Skip to content

Commit 7da897b

Browse files
Create Dockerfile
1 parent b4582ff commit 7da897b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Use an official Python runtime as a parent image
2+
FROM python:3.9-slim
3+
4+
# Set the working directory in the container to /app
5+
WORKDIR /app
6+
7+
# Create a new virtual environment
8+
RUN python -m venv venv
9+
10+
# Update PATH to include virtual environment's bin directory but don't use that here.
11+
ENV PATH="/app/venv/bin:$PATH"
12+
13+
COPY entrypoint.sh /
14+
RUN chmod +x /entrypoint.sh
15+
16+
COPY requirements.txt .
17+
18+
RUN pip install --upgrade pip && \
19+
pip install --no-cache-dir -r requirements.txt
20+
21+
COPY . .
22+
23+
EXPOSE 8000
24+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)