by derefr · 11y ago · 0 comments
Even then, from the perspective of building a Docker image in particular, a lot of "Essential" is truly inessential: a Docker app doesn't run any OS daemons, interact directly with the hardware, or perform startup functions. You don't need an hwdb or a charmap database, you don't need grub or mkinitramfs, etc.
Most interestingly, for a Docker production image that you're constructing with debootstrap, you don't need apt itself... but just try convincing debootstrap to not install apt.
Instead of using debootstrap to create your chroot environment, try using multistrap. Multistrap uses apt to do package selection and not the "stupid" dependency resolver that debootstrap uses. Thus, you have much more freedom in selecting which packages you want. For example with multistrap it is possible to create a chroot that only contains Essential:yes packages (that means no apt).