# 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.192.168.1.7.nip.io/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"]
