debuerreotype / docker-debian-artifacts

Official builds of debuerreotype-generated Debian tarballs for use in Docker
https://docker.debian.net
Apache License 2.0
317 stars 104 forks source link

Ship containers with /bin => /usr/bin symlinks #180

Closed MichaIng closed 2 years ago

MichaIng commented 2 years ago

Debian images and debootstrap ship images with /bin => /usr/bin (for /lib respectively) symlinks, but the Docker containers do not. This can be seen in the used rootfs archives: https://github.com/debuerreotype/docker-debian-artifacts/blob/dist-amd64/bullseye/rootfs.tar.xz

I suggest to align the Debian Docker containers with the regular images and ship them with those symlinks to merge /bin|/lib with /usr/bin|/usr/lib. This would also align the Debian containers with Ubuntu (Focal and Jammy), Fedora (35 and 36) and CentOS 8 containers which all ship with these symlinks.

In CI/CD scenarios, having all distro containers with an aligned rootfs structure, makes things easier 🙂.

MichaIng commented 2 years ago

Ah, now I saw #131 that it is done for the Bookworm containers only. What is the reason to not apply it consistently on all containers? With an active overlayfs, usrmerge cannot be applied, but this is about how the initial rootfs is shipped, hence usrmerge is not used anyway.

tianon commented 2 years ago

The really short answer is that merged-/usr is not officially supported by the Debian project until Bookworm. The longer answer is the discussion in #131.

MichaIng commented 2 years ago

I further read into the issues when using the containers for builds, and agree with the potential issues. I wonder why none of the other listed distros consider this as an issue for their official Docker containers 🤔.

However, makes sense, and at least in our case we can easily work around the unmerged /usr. Marking this as closed.

tianon commented 2 years ago

That's because they made the transition earlier; once the transition is finished (bookworm+), Debian won't have issues with it either. 👍