forked from ryansurf/cli-surf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 795 Bytes
/
Dockerfile
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
32
FROM python:alpine3.20
# install apt packages (curl command)
RUN apk add --update-cache curl && \
apk cache clean && \
rm -rf /var/cache/apk/*
#this instruction specifies the "working directory"
#or the path in the image where files will be copied and commands will be executed.
WORKDIR /app
# Copy in the source code
COPY . .
# Copy in the .env file
COPY .env.example .env
# Install the application dependencies
RUN pip install poetry
RUN poetry config installer.max-workers 10
RUN poetry install --no-interaction --no-ansi
# # Setup an app user so the container doesn't run as the root user
# RUN useradd app
# USER app
# Set the working directory for running the application
EXPOSE 8000
# Command to run the Flask application
CMD ["poetry", "run", "python", "src/server.py"]