game.onl / Dockerfile
ServerX's picture
Update Dockerfile
a8170e1 verified
raw
history blame contribute delete
561 Bytes
FROM python:3.9-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user && \
chown -R user:user /app
USER user
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/home/user/.local/bin:${PATH}"
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
COPY --chown=user . .
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "--preload", "--workers", "2", "app:app"]