Files
Scrap-Web/pricing/Dockerfile
T
samahk13 9fdfd00fa6
Scrap-Web/pipeline/pr-main This commit looks good
Scrap-Web/pipeline/head Something is wrong with the build of this commit
Patch libzstd1 (CVE-2026-124851) found by the image scan
2026-11-30 02:04:11 +00:00

16 lines
926 B
Docker

# Base image pinned by digest (python:3.13-slim, linux/amd64 for the Droplet).
FROM python:3.13-slim@sha256:e48f59cdba69a3cbd9ed2cf0f348d90d45a8d350d98134cf1070bc106ee9ed90
ARG APP_COMMIT=development
ENV APP_COMMIT=$APP_COMMIT PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt .
# Exact, hash-checked dependency versions (direct + transitive) from requirements.txt
RUN pip install --no-cache-dir --require-hashes -r requirements.txt
RUN apt-get update && apt-get install -y --only-upgrade zlib1g libzstd1 && rm -rf /var/lib/apt/lists/* \
&& pip uninstall -y pip setuptools
COPY app.py .
USER 10001:10001
EXPOSE 8000
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)"
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "1", "--worker-tmp-dir", "/tmp", "app:app"]