Upgrade Bookworm packages in the node-installer image.

The pinned base still carries gnutls, openssl, and perl builds that have fixed replacements. Trivy rejects the image until those packages are upgraded.
This commit is contained in:
G
2026-10-19 00:14:43 +02:00
parent 3c80778156
commit 84515b7556
+4 -2
View File
@@ -4,7 +4,8 @@
# docker build -f src/k7/deploy/node_installer/Dockerfile -t k7-node-installer:<k7-version> .
# Both stages share one base; literal FROM lines so Dependabot can bump the digest.
FROM python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c AS artifacts
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
RUN apt-get update && apt-get upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY src/k7/deploy/node_installer/artifacts.txt src/k7/deploy/node_installer/fetch-artifacts.sh /tmp/
RUN bash /tmp/fetch-artifacts.sh /tmp/artifacts.txt /opt/k7-artifacts
@@ -13,7 +14,8 @@ RUN bash /tmp/fetch-artifacts.sh /tmp/artifacts.txt /opt/k7-artifacts
FROM python:3.12.12-slim-bookworm@sha256:593bd06efe90efa80dc4eee3948be7c0fde4134606dd40d8dd8dbcade98e669c
# file: the role's ELF check is a controller-side lookup. nsenter ships in the base (util-linux).
COPY src/k7/deploy/node_installer/requirements.txt /tmp/requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends file \
RUN apt-get update && apt-get upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends file \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir --no-deps -r /tmp/requirements.txt \
&& pip check