Interview Prep/Docker/Containers, VMs & Isolation Internals

Does a container have its own kernel modules or clock?

AdvancedConceptContainers, VMs & Isolation Internals
Answer

No. Kernel modules are loaded in the host kernel and shared (a container needs CAP_SYS_MODULE to load them, which should never be given). The system clock is also shared; there is no time namespace for the realtime clock (the time namespace only offsets monotonic and boottime clocks, and Docker does not use it by default). Changing time in a container requires CAP_SYS_TIME and affects the host.

All Docker questions Roadmap: Docker & containers

More on Containers, VMs & Isolation Internals