AwokeKnowing
AwokeKnowing

Reputation: 8226

For Docker, will apps stop working when host kernel is updated?

I'm a 90% windows guy but I like ubuntu and use it for things like ROS, or opencv, or python, etc.

For complex Apps like ROS, which come out with new versions every few months, Docker seems absolutely ideal to have several versions running side by side.

What I'm asking is regarding the kernel. I don't have any real idea how the kernel works or how often it's updated. But I wonder if my docker images will stop running if I get a kernel update on the host.

So basically, I'm familiar with a VM, where as long as there's an x86 CPU and RAM and HDD, your VM is going to work, and not break by any host OS updates.

But for Docker, should I be concerned that in a couple years when the linux kernel has gone through some updates, my Docker images/containers won't work anymore? And if re-compile some code in a Docker container on a host with a newer kernel, will that image/container not run on a host with an older kernel?

Upvotes: 4

Views: 2129

Answers (1)

mbarthelemy
mbarthelemy

Reputation: 12913

in a couple years when the linux kernel has gone through some updates, my Docker images/containers won't work anymore?

Linux, as a kernel, never breaks the user space applications. This has been the case for many years now, and they have no plan to change that.

In fact, most of the applications almost never "talk", and are never linked, to the kernel, unless they need to access really low-level stuff.

Instead, applications use the libc which provides all the base system calls and functions (see this link).

Should major updates to the libc happen, this library is not shared between the host and the containers, it is embedded in your container anyway.

That means that you can (and should) apply any kernel update available on your host, for security reasons. You should also make sure that your container packages are kept up to date.

Upvotes: 6

Related Questions