buildDocker.groovy hardcoded harbor.35.238.248.203.nip.io as the push target, so the registry could not move without editing this shared library and every consumer moving in the same commit. It now reads config.harbor_registry, whose default lives in homelabPipeline.groovy beside harbor_project and every other key. The stage errors rather than defaulting when the value is missing. Carrying a second copy of the literal would leave two defaults free to disagree, and an unset value would otherwise build an image named "null/<project>/<repo>" — which docker accepts as a hostname and then fails to resolve, pointing nowhere near the cause. The dind pod no longer mounts the registry CA. That mount existed because the registry was a nip.io name, which no public CA will issue for, so cert-manager signed Harbor from a private CA; the node pool was told to trust it for pulls, but a push comes from dockerd inside the build pod, which has its own trust store. harbor.infra.deployshed.com carries a Let's Encrypt certificate that both already trust, so the mount, its volume and the whole arrangement go away rather than being repointed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEsTefWWifp4ikvhHF5s6N
19 lines
997 B
Plaintext
19 lines
997 B
Plaintext
# Fallback only — see go-Dockerfile's header comment for the general
|
|
# rule, including the Harbor base-images sourcing (also applies here).
|
|
# Simplified from the real python-*-Dockerfile set (which had four
|
|
# separate version-pinned files, 2.7/3.7/3.10.12/3.13) into one
|
|
# version-parametrized template. Assumes a standard requirements.txt +
|
|
# app.py (Flask/FastAPI-style `app:app` target for gunicorn) repo.
|
|
# Switched from python:*-slim (Debian) to python:*-alpine — smaller,
|
|
# still keeps a shell (not distroless). Caveat: pip packages with C
|
|
# extensions that only ship glibc wheels may need musl-dev/gcc added
|
|
# here to build from source on Alpine — fine for this repo's pure-Python
|
|
# deps, worth knowing if a future repo's requirements.txt needs more.
|
|
FROM harbor.infra.deployshed.com/base-images/python:${version}-alpine
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY . .
|
|
EXPOSE 8080
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]
|