CMG/Dockerfile
2025-02-05 06:44:31 -05:00

17 lines
354 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 . .
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", "--host=0.0.0.0"]