CMG/Dockerfile
2025-01-28 07:04:13 -05:00

17 lines
342 B
Docker

FROM python:3.12
WORKDIR /usr/local/app
# Install the application dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy in the source code
COPY src ./src
EXPOSE 5000
# Setup an app user so the container doesn't run as the root user
RUN useradd app
USER app
CMD ["flask", "--app", "build", "run"]