Skip to content

Ship static busybox shell in k8s-device-plugin image#1793

Open
rajathagasthya wants to merge 1 commit into
mainfrom
add-static-shell
Open

Ship static busybox shell in k8s-device-plugin image#1793
rajathagasthya wants to merge 1 commit into
mainfrom
add-static-shell

Conversation

@rajathagasthya
Copy link
Copy Markdown
Contributor

Flip the base from *-dev* to non-*-dev* distroless and source a static busybox from debian:trixie-slim. The device-plugin entrypoint and any shell-based lifecycle hooks continue to work via /bin/sh and busybox applet symlinks layered into the final image.

Part of NVIDIA/cloud-native-team#299.
Resolves #1744.

@rajathagasthya rajathagasthya marked this pull request as ready for review May 20, 2026 16:22
Flip the base from *-dev* to non-*-dev* distroless and source a static
busybox from debian:trixie-slim. The device-plugin entrypoint and any
shell-based lifecycle hooks continue to work via /bin/sh and busybox
applet symlinks layered into the final image.

Part of NVIDIA/cloud-native-team#299.

Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
RUN ln -s /busybox/sh /bin/sh

COPY --from=shell /busybox /busybox
RUN ["/busybox/ln", "-s", "/busybox/sh", "/bin/sh"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't quite a departure from '-dev' if we use busybox-static. Why not bash-static?
Is it because we use extensive shell utilities?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the deployment manifests use shell utilities (rm, cat, etc.), which we don't get if use bash-static.

The -dev images also ship busybox in the same /busybox layout, so it's not really a departure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship static busybox shell in k8s-device-plugin image

2 participants