Files
lumeex/Dockerfile
T
Djeex f22634e9d9
CI / build-and-scan (push) Successful in 2m43s
CI/CD hardening: lint, secret scan, coverage gate, auto CVE-fix PRs, GHCR + GitHub mirror publishing (#34)
- release changelog: commits rendered as description (link), divider lines dropped
- gitleaks secret scan and hadolint on every push/PR
- ruff lint/format gate (Python repos) with a pytest --cov-fail-under gate
- scheduled CRITICAL Trivy failures attempt an apk upgrade rebuild and open a follow-up PR if it clears the finding, instead of just failing red
- images also published to ghcr.io/djeex/<repo>
- a matching GitHub Release is created on the GitHub mirror, with a notice pointing back to this repo as the source of truth
2026-08-26 15:38:54 +02:00

39 lines
918 B
Docker

FROM python:3.14.7-alpine AS builder
WORKDIR /app
RUN apk add --no-cache gcc musl-dev jpeg-dev zlib-dev
COPY requirements.txt .
RUN pip wheel --no-cache-dir --wheel-dir=/wheels -r requirements.txt
FROM python:3.14.7-alpine AS base
WORKDIR /app
COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir --find-links=/wheels /wheels/* && rm -rf /wheels
COPY build.py gallery.py VERSION /app/
COPY ./src/ ./src/
COPY ./config /app/default
COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
FROM base AS test
COPY requirements.txt requirements-dev.txt pytest.ini /app/
RUN pip install --no-cache-dir -r requirements-dev.txt
COPY ./tests/ ./tests/
COPY ./demo/ ./demo/
FROM base AS lint
RUN pip install --no-cache-dir ruff==0.16.4
COPY ruff.toml /app/ruff.toml
COPY ./tests/ ./tests/
RUN ruff check . && ruff format --check .
FROM base
ENTRYPOINT ["/app/entrypoint.sh"]