mount your app to /app/app.py
FROM python:3.10.14-slim
ARG USERNAME=nonroot
ARG USER_UID=1000
ARG USER_GID=$USER_UID
USER root
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& chown -R $USER_UID:$USER_GID /home/$USERNAME
USER $USERNAME
ENV PATH="/home/nonroot/.local/bin:${PATH}"
WORKDIR /app
COPY src/requirements.txt .
RUN pip install -r requirements.txt
COPY src/gunicorn_config.py .
CMD ["gunicorn","--config", "gunicorn_config.py", "app:app"]
import os
workers = int(os.environ.get("GUNICORN_PROCESSES", "2"))
threads = int(os.environ.get("GUNICORN_THREADS", "4"))
bind = os.environ.get("GUNICORN_BIND", "0.0.0.0:8080")
forwarded_allow_ips = "*"
Content type
Image
Digest
sha256:53989420e…
Size
49.8 MB
Last updated
almost 2 years ago
docker pull imagelist/flask-template