Docker containers are not miniature independent systems: they share the host’s Linux kernel and use namespaces, cgroups, OverlayFS, capabilities and seccomp for isolation, resource control and security.
Docker builds its container model on Linux kernel features rather than on a separate kernel for every container. Namespaces limit what processes can see, including filesystem mount points, devices, networks and other processes, creating boundaries between containers and the host.
Namespaces alone do not control resource consumption. Docker uses cgroups to set limits for CPU, RAM and other resources, including the maximum number of processes. These limits are not applied automatically and must be configured when containers run.
OverlayFS helps Docker images use layered storage. A shared read-only LowerDir contains common tools and libraries, while a container-specific writable UpperDir stores changes; a MergedDir presents the combined view to the container.
Docker also uses Linux capabilities to remove or restrict high-risk root privileges, while seccomp blocks selected system calls such as ptrace or unshare through its default profile. Containers still share the host kernel, so kernel vulnerabilities and configuration mistakes can weaken isolation. On macOS and Windows, Docker uses a Linux virtual machine to provide the kernel for Linux containers.