Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support usrmerged /bin and /sbin #1477

Closed
wants to merge 1 commit into from

Commits on Dec 7, 2023

  1. support usrmerged /bin and /sbin

    Distros are adopting the merged /usr directories scheme where the /{bin,sbin,lib}/
    directories are made symbolic links to /usr/{bin,sbin,lib}/.
    
    There are use cases where this could be justified for Distroless
    as well. For example, a statically built Busybox/Toybox w/ built-in
    shell can be installed to /usr/bin and still have the typical
    shellscript shebangs (/bin/sh or /bin/bash) working.
    
    However, Debian 11/12 base packages (base-files, libc6 etc) do not
    support the merged /usr so it's not very straightfoward to enable
    for Distroless.
    
    One approach to support this for /bin/ and /sbin is to create a
    layer with whiteouts and symlinks. Tests are also added to ensure
    any Distroless image flavor does not overwrite the symlinks created
    in that lower layer.
    
    Signed-off-by: Mikko Ylinen <[email protected]>
    mythi committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    d8c5261 View commit details
    Browse the repository at this point in the history