Код IT Загрузка примера кода…

Dockerfile main.dockerfile
FROM python:3.12-slim

ENV APP_HOME=/app \
    PYTHONUNBUFFERED=1

WORKDIR $APP_HOME

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN adduser --disabled-password --gecos '' appuser
USER appuser

EXPOSE 5000
CMD ["python", "app.py"]
FROM python:3.12-slim

ENV APP_HOME=/app \
    PYTHONUNBUFFERED=1

WORKDIR $APP_HOME

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN adduser --disabled-password --gecos '' appuser
USER appuser

EXPOSE 5000
CMD ["python", "app.py"]