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.
More on Containers, VMs & Isolation Internals
What is a container, in one sentence?BeginnerHow do containers differ from virtual machines?BeginnerCan a Linux container run a Windows application, or the reverse?IntermediateWhat are Linux namespaces? Name the ones Docker uses.BeginnerWhat are cgroups and what do they do for containers?BeginnerWhat is PID 1 in a container and why does it matter?Intermediate