Files
mtusi2026lab7/Dockerfile
T
makkelay 1d146756d7
Skeleton contracts / contracts (pull_request) Canceled after 0s
[+] add project
2026-12-05 22:05:31 +03:00

22 lines
504 B
Docker

FROM python:3.12.8-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
RUN groupadd --system --gid 10001 messenger \
&& useradd --system --uid 10001 --gid messenger --home-dir /app messenger
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --no-cache-dir -r /app/requirements.txt
COPY app /app/app
RUN chown -R 10001:10001 /app
USER 10001:10001
EXPOSE 8443
CMD ["python", "-m", "app.api"]