seat-back-trivia/pipeline/pr-main There was a failure building this commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
767 B
Docker
13 lines
767 B
Docker
FROM python:3.13-alpine3.23@sha256:e4aeaca9081549f19bd5bc8605ed5ab257ba34f97e0471f8e09161f45b4b08b8
|
|
ARG APP_COMMIT=development
|
|
ENV APP_COMMIT=$APP_COMMIT PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
# pip is not needed at runtime, and its bundled packages carry scanner findings.
|
|
RUN pip install --no-cache-dir -r requirements.txt && python -m pip uninstall -y pip && rm -rf /usr/local/lib/python3.13/ensurepip
|
|
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"]
|