forked from mtusi2026/mtusi2026lab3
17 lines
376 B
Docker
17 lines
376 B
Docker
FROM python:3.13-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN python -m pip install --no-cache-dir -r requirements.txt
|
|
COPY app.py ./
|
|
COPY migrations ./migrations/
|
|
|
|
RUN useradd --create-home --shell /usr/sbin/nologin appuser && \
|
|
chown -R appuser:appuser /app
|
|
USER appuser
|
|
|
|
EXPOSE 8080
|
|
CMD ["python", "app.py"]
|