How do package managers skip kernel upgrades inside containers?

This is a generic question, because I’m curious about the answer.

I was upgrading a server that runs Arch Linux. I saw that the linux kernel was upgraded. Time to reboot, right?

Then it occurred to me. Containers share the kernel with the host. But how do you design a container distribution that doesn’t try to upgrade the kernel? Do you just mask certain packages? On Arch, for instance, the kernel is the linux package.

I am guessing what you all need to do depends on the distro. What’s the usual procedure for building a containerized distro?

It’s pretty simple, we simply don’t request the kernel package be installed when assembling the image :slight_smile: