31 lines
847 B
Docker
31 lines
847 B
Docker
FROM python:3.11-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir --requirement requirements.txt
|
|
|
|
ARG APP_UID=1000
|
|
ARG APP_GID=1000
|
|
RUN groupadd --gid "${APP_GID}" roster \
|
|
&& useradd --uid "${APP_UID}" --gid roster --create-home --shell /usr/sbin/nologin roster \
|
|
&& mkdir -p /app/output \
|
|
&& chown -R roster:roster /app
|
|
|
|
COPY --chown=roster:roster main.py roster_formatter.py server.py \
|
|
roster_classifier.py combined_roster.py ./
|
|
COPY --chown=roster:roster modules/ ./modules/
|
|
COPY --chown=roster:roster utils/ ./utils/
|
|
COPY --chown=roster:roster assets/ ./assets/
|
|
COPY --chown=roster:roster web/ ./web/
|
|
|
|
USER roster
|
|
|
|
EXPOSE 8787
|
|
|
|
CMD ["python", "server.py", "--host", "0.0.0.0", "--port", "8787"]
|