Part of NVIDIA/cloud-native-team#299.
NVIDIA STIG policy is dropping -dev distroless tags as approved
parent images. To move the gpu-operator image onto a non--dev base
without rewriting validator/operand manifests or hack/must-gather.sh,
we ship a static busybox shell inside the image.
Approach
Add a debian:trixie-slim shell-builder stage to docker/Dockerfile
that apt-installs busybox-static. Copy /bin/busybox into the final
stage and run busybox --install -s /bin to populate /bin/sh,
/bin/rm, /bin/ln, etc. Flip the final base from
nvcr.io/nvidia/distroless/cc:<ver>-dev to the matching non--dev
variant.
FROM debian:trixie-slim AS shell-builder
RUN apt-get update \
&& apt-get install --no-install-recommends -y busybox-static \
&& rm -rf /var/lib/apt/lists/*
FROM nvcr.io/nvidia/distroless/cc:<version>
COPY --from=shell-builder /bin/busybox /bin/busybox
RUN ["/bin/busybox", "--install", "-s", "/bin"]
Validator-pod manifests, operand-asset sh -c wrappers,
hack/must-gather.sh (mounted at /usr/bin/gather), and the
rmglob preStop helper all remain untouched. Mechanical Dockerfile
change.
Precedent:
kubernetes-sigs/dra-driver-nvidia-gpu
uses the same pattern with bash-static.
Tracking
Tracked in PR #2434, being repurposed from the
earlier Go-absorption approach.
Acceptance
Part of NVIDIA/cloud-native-team#299.
NVIDIA STIG policy is dropping
-devdistroless tags as approvedparent images. To move the gpu-operator image onto a non-
-devbasewithout rewriting validator/operand manifests or
hack/must-gather.sh,we ship a static busybox shell inside the image.
Approach
Add a
debian:trixie-slimshell-builder stage todocker/Dockerfilethat apt-installs
busybox-static. Copy/bin/busyboxinto the finalstage and run
busybox --install -s /binto populate/bin/sh,/bin/rm,/bin/ln, etc. Flip the final base fromnvcr.io/nvidia/distroless/cc:<ver>-devto the matching non--devvariant.
Validator-pod manifests, operand-asset
sh -cwrappers,hack/must-gather.sh(mounted at/usr/bin/gather), and thermglobpreStop helper all remain untouched. Mechanical Dockerfilechange.
Precedent:
kubernetes-sigs/dra-driver-nvidia-gpuuses the same pattern with
bash-static.Tracking
Tracked in PR #2434, being repurposed from the
earlier Go-absorption approach.
Acceptance
-devdistroless tag/bin/shand friends are present at runtime via static busyboxgatherplugin all run as before