fix:libzstd1, msgpack, urllib3, setuptools, pip
This commit is contained in:
1 parent
5e50183cc4
commit
bfe9712a7c
2 files changed
+12
-2
No files matched your search
+9
-1
@@ -18,7 +18,8 @@ ENV PIP_NO_CACHE_DIR=1 \
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY requirements.lock ./
|
COPY requirements.lock ./
|
||||||
RUN python -m venv /opt/venv \
|
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
|
COPY surveybox ./surveybox
|
||||||
RUN /opt/venv/bin/pybabel compile --statistics -D messages -d surveybox/locale \
|
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" \
|
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; \
|
> /etc/apt/sources.list.d/pgdg.list; \
|
||||||
apt-get update; \
|
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; \
|
pkgs=""; for v in ${PG_CLIENT_VERSIONS}; do pkgs="$pkgs postgresql-client-$v"; done; \
|
||||||
apt-get install -y --no-install-recommends $pkgs; \
|
apt-get install -y --no-install-recommends $pkgs; \
|
||||||
apt-get purge -y --auto-remove curl gnupg; \
|
apt-get purge -y --auto-remove curl gnupg; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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 \
|
RUN groupadd --system --gid 10001 surveybox \
|
||||||
&& useradd --system --uid 10001 --gid surveybox --home-dir /nonexistent \
|
&& useradd --system --uid 10001 --gid surveybox --home-dir /nonexistent \
|
||||||
--no-create-home --shell /usr/sbin/nologin surveybox \
|
--no-create-home --shell /usr/sbin/nologin surveybox \
|
||||||
|
|||||||
+3
-1
@@ -45,7 +45,9 @@ Bei jedem Push laufen:
|
|||||||
- Teilnehmer-Seite unter 100 KB ohne Bilder und ohne externe Ressourcen.
|
- Teilnehmer-Seite unter 100 KB ohne Bilder und ohne externe Ressourcen.
|
||||||
- **Installations- und Update-Test** im Wegwerf-Stack (`scripts/upgrade-test.sh`).
|
- **Installations- und Update-Test** im Wegwerf-Stack (`scripts/upgrade-test.sh`).
|
||||||
- **Trivy**: Image auf bekannte Lücken (hoch und kritisch, mit verfügbarer
|
- **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
|
## Abnahme vor der ersten produktiven Nutzung
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user