Reputation: 1366
If my program depends on some function of a kernel library, and that function in turn has a chain of dependencies, how does docker stay small and portable without taking a snapshot of all the kernel libraries (and managing dependency issues at a function rather than library level)? In other words how does it insulate itself from changes in Kernel libraries from one version to the next, and does it do so at a library or function granlarity?
Also what if my application has a software stack where for example one function is compatible with a future version of kernel library A whereas a second function that uses kernel library A is no longer compatible. In other words:
function 1&2 both depend on and work with functions in kernel Lib A version 1.0
function 1 works with Lib A version 1.1 function 2 breaks with Lib A version 1.1 (function 2 still needs Lib A version 1.0)
I don't know much about Docker so this is a newbie question.
Upvotes: 15
Views: 3893
Reputation:
There is no such thing as a "kernel library". The closest things to what you're describing are:
libc
, which is part of the container image, and hence does not change.
The Linux kernel ABI, which is mostly constant. While some changes are occasionally made to the kernel ABI, this is done as rarely as possible - kernel developers do everything possible to maintain backwards compatibility. Where changes are made, it is most often in components that would not be relevant to applications running in a container (e.g, audio / video output, dynamic device management, etc).
Upvotes: 19