fix:libzstd1, msgpack, urllib3, setuptools, pip
CI / audit (push) Skipped
CI / checks (push) Successful in 3m25s
CI / image (push) Successful in 1m36s

This commit is contained in:
marco.morath committed 2026-11-25 22:47:37 +01:00
1 parent 5e50183cc4
commit bfe9712a7c
2 files changed
+12 -2

No files matched your search

+9 -1
View File
@@ -18,7 +18,8 @@ ENV PIP_NO_CACHE_DIR=1 \
WORKDIR /build
COPY requirements.lock ./
RUN python -m venv /opt/venv \
&& /opt/venv/bin/pip install --require-hashes --no-deps --only-binary=:all: -r requirements.lock
&& /opt/venv/bin/pip install --require-hashes --no-deps --only-binary=:all: -r requirements.lock \
&& /opt/venv/bin/python -m pip uninstall -y pip
COPY surveybox ./surveybox
RUN /opt/venv/bin/pybabel compile --statistics -D messages -d surveybox/locale \
@@ -43,11 +44,18 @@ RUN set -eux; \
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${DEBIAN_SUITE}-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list; \
apt-get update; \
# Sicherheitsupdates, die im Basis-Image noch fehlen
apt-get upgrade -y --no-install-recommends; \
pkgs=""; for v in ${PG_CLIENT_VERSIONS}; do pkgs="$pkgs postgresql-client-$v"; done; \
apt-get install -y --no-install-recommends $pkgs; \
apt-get purge -y --auto-remove curl gnupg; \
rm -rf /var/lib/apt/lists/*
# pip wird zur Laufzeit nicht gebraucht; seine mitgelieferten Bibliotheken
# (urllib3, msgpack, setuptools) würden sonst als Lücken im Image auftauchen.
RUN python -m pip uninstall -y pip \
&& rm -rf /usr/local/lib/python3.*/ensurepip
RUN groupadd --system --gid 10001 surveybox \
&& useradd --system --uid 10001 --gid surveybox --home-dir /nonexistent \
--no-create-home --shell /usr/sbin/nologin surveybox \
+3 -1
View File
@@ -45,7 +45,9 @@ Bei jedem Push laufen:
- Teilnehmer-Seite unter 100 KB ohne Bilder und ohne externe Ressourcen.
- **Installations- und Update-Test** im Wegwerf-Stack (`scripts/upgrade-test.sh`).
- **Trivy**: Image auf bekannte Lücken (hoch und kritisch, mit verfügbarer
Korrektur) – bricht den Lauf ab.
Korrektur) – bricht den Lauf ab. Damit das Image dabei sauber bleibt, spielt
der Build Debian-Sicherheitsupdates ein, die im Basis-Image noch fehlen, und
entfernt pip samt seinen mitgelieferten Bibliotheken (zur Laufzeit unnötig).
## Abnahme vor der ersten produktiven Nutzung