Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A Docker container is an isolated set of Linux processes, not a complete guest operating system. Docker combines kernel namespaces for separate resource views, cgroups for resource control, and layered filesystems for efficient image sharing; an OCI runtime such as runc, launched through containerd, connects the daemon’s configuration to those kernel features.

What a Docker container actually is

Running docker run does not boot a second Linux kernel. The Docker daemon asks the host kernel to start ordinary processes with restricted, rearranged views of the host. The result looks like a small machine because the process sees its own filesystem root, process tree, hostname, network interfaces and other resources, but those resources are still provided by the host kernel.

Docker’s own overview describes namespaces as the technology that provides the container’s isolated workspace: Docker’s “What is Docker?” documentation. Isolation is configurable rather than absolute. Containers can communicate through networks you connect, and the security boundary also depends on daemon privileges, Linux capabilities, the container configuration and kernel hardening. Docker’s security guidance covers those qualifications at Docker Engine security.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The startup path: from Docker command to kernel process

  1. The client sends a request. The Docker CLI turns your image, command, environment, mounts, network and resource settings into an API request to the Docker daemon (dockerd).
  2. The daemon prepares the container. It resolves the image, creates or selects writable storage, sets up mounts and networking, and records the requested limits and security settings.
  3. containerd manages execution. Docker invokes an OCI-compliant runtime through containerd. Docker’s daemon reference documents runc as the default runtime and explains this handoff at the dockerd reference.
  4. The runtime configures the kernel. The runtime creates namespaces, joins the process to cgroups, applies capabilities and mounts the container root filesystem, then starts the configured entrypoint.
  5. The application becomes the container’s process. The process runs directly on the host kernel. If that process exits, the container normally stops, although its image and any separately stored volume data remain available.

This division matters when troubleshooting. A failure can originate in image retrieval, daemon configuration, containerd, the OCI runtime, a kernel feature, a storage driver or the application itself; “Docker” is the user-facing control plane, not the component implementing every isolation primitive.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Namespaces: separate views of shared kernel resources

A namespace changes what a process is allowed to see. Processes in one namespace can have a different view from processes outside it, even though the same kernel services the entire host.

Process (PID) view

A container can have its own process-numbering view. The application may see itself as PID 1 and see only processes in its container, while the host retains a broader process view. PID 1 also has special responsibilities for signal handling and reaping child processes, so an entrypoint that does not handle those jobs can produce confusing shutdown behavior.

Mount and filesystem view

The mount namespace gives the container its own arrangement of mounted filesystems. Docker can make an image-derived root appear at /, add bind mounts or volumes, and hide host paths that are not explicitly exposed. A mount namespace is not the same thing as data persistence: it controls visibility, while the storage layers and mounts determine where bytes are actually written.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Network view

Network namespaces provide interfaces, routes and firewall context distinct from the host’s default network namespace. Docker then connects that namespace to a bridge, host network or another configured network. Two containers can communicate when Docker’s networking configuration permits it; namespace isolation does not automatically mean network isolation.

UTS, IPC and user views

UTS settings allow a container-specific hostname. IPC namespaces separate mechanisms such as shared memory and semaphores. User namespaces can map container user IDs to different host IDs, reducing the impact of processes that run as root inside the container when the host and daemon configuration support that mode.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Namespaces answer the question “what can this process see?” They do not by themselves decide how much CPU time or memory it may consume, nor do they guarantee that a privileged container cannot affect the host. Those concerns require cgroups and security controls.

Cgroups: controlling consumption rather than visibility

Control groups, usually called cgroups, place the container’s processes in a kernel-managed hierarchy. Docker uses them as the resource-control mechanism associated with a container, as described in Docker Engine security. A cgroup can account for usage and enforce limits or priorities for resources such as CPU and memory; the exact controls available depend on the host kernel and Docker configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why limits change behavior

  • A CPU limit can constrain how much processor time a busy container receives instead of allowing it to consume every available core.
  • A memory limit can cause allocation failures or an out-of-memory termination when the process exceeds its allowance. The application may report an ordinary allocation error, while the host remains protected from unlimited growth.
  • Accounting data helps explain why a container is throttled or terminated, but it does not make an inefficient application efficient.

Namespaces and cgroups solve different problems. Namespaces provide a process with a restricted perspective; cgroups constrain the quantity of shared resources it can use. A production configuration normally needs both, plus least-privilege capabilities, an appropriate user, a read-only root where practical and a carefully selected set of mounts.

Images, layers and the writable container layer

A Docker image is assembled from filesystem layers. Each Dockerfile instruction generally contributes a layer, and unchanged layers can be shared by many containers. This sharing reduces duplicate storage and lets Docker reuse already-downloaded content.

When Docker creates a container, it adds a container-specific writable layer above the image’s read-only layers. The process sees one merged directory tree, but Docker can keep the common image content unchanged underneath. The storage-driver overview explains this model at Docker storage drivers.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

What happens on a read

If a requested file exists in a lower image layer and has not been replaced, the merged filesystem returns that lower-layer content. Multiple containers can read the same immutable image data concurrently.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What happens on a write

A write cannot alter a shared read-only image layer. The storage implementation creates a container-owned version in the writable layer, then applies the change there. This is commonly called copy-on-write, although the copy occurs when a lower-layer object first needs modification rather than when the container starts.

Deleting files in a container

Deleting a file from an image does not physically remove it from the lower layer. The writable layer records a deletion marker so the merged view hides the lower copy. The original image remains reusable by other containers.

OverlayFS and the classic overlay2 model

On Linux systems using Docker’s classic overlay2 storage driver, OverlayFS combines read-only lower directories with a container-specific upper directory and presents a merged mount. Docker’s implementation details, including copy-up behavior, are documented in the OverlayFS storage driver guide.

Suppose an image contains /etc/app.conf. A container that only reads it can use the lower image layer. If the application edits it, overlay2 copies the file into the upper directory, and subsequent reads and writes use that upper copy. The image’s version is unchanged, so another container created from the same image still starts with the original file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Copy-up can be expensive for large files or directories, and repeated writes increase the container layer’s size. Docker therefore advises using volumes for write-heavy application data rather than treating the writable layer as a database or durable workspace. The storage-driver guidance is at Docker storage drivers.

The current storage-driver caveat: Engine 29.0 and later

Do not assume every current installation stores image data under /var/lib/docker/overlay2. Docker’s selection guidance says fresh Docker Engine 29.0 and later installations use the containerd image store by default. An installation upgraded from an earlier setup can continue using a classic storage driver instead.

With the containerd image store, Docker documents image contents and container snapshots under /var/lib/containerd; other daemon data remains under /var/lib/docker. The daemon data-directory behavior is described in Docker daemon configuration overview. The directory you inspect is therefore evidence of the active configuration, not a universal rule.

How the main storage choices differ

Option What it provides When it fits Important qualification
Containerd snapshotters Snapshot and image storage integrated with the containerd image store. Fresh Docker Engine 29.0+ installations using the default image store. Exact behavior depends on the selected snapshotter and host configuration.
overlay2 OverlayFS lower layers, an upper writable layer and a merged view. Classic Linux Docker installations needing a broadly compatible copy-on-write driver. Upgraded installations may retain it; it is not the default for every fresh 29.0+ installation.
fuse-overlayfs An OverlayFS-compatible approach implemented through FUSE. Certain rootless Linux hosts where kernel OverlayFS support or permissions are limiting. Suitability depends on kernel, distribution and rootless configuration.
btrfs or zfs Filesystem-native snapshot and copy-on-write capabilities. Hosts already designed and maintained around those filesystems. They require additional filesystem setup and operational maintenance.
vfs A compatibility-oriented storage approach without copy-on-write efficiency. Testing or environments where copy-on-write support is unavailable. It can use more storage and is generally not the first choice for production workloads.

Docker’s current selection documentation covers these choices and their compatibility considerations at Select a storage driver. Choose based on Engine version, whether the containerd image store is enabled, Linux kernel and backing-filesystem support, workload write patterns, and operational stability—not on a directory name copied from another host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why volumes survive container removal

The writable container layer belongs to a particular container. Removing that container removes its layer, so changes stored only there disappear. A named volume or another persistent mount stores data outside that disposable layer and can be mounted into a replacement container.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

A safe persistence demonstration

  1. Create a volume: docker volume create demo-data.
  2. Write data through a temporary container: docker run --rm -v demo-data:/data alpine sh -c 'echo persistent > /data/example.txt'.
  3. Remove the temporary container. The --rm flag removes its container layer when the command exits.
  4. Read the volume from another container: docker run --rm -v demo-data:/data alpine cat /data/example.txt. The output is persistent because the file was written to the volume.
  5. Delete the volume only when its data is no longer needed: docker volume rm demo-data.

A bind mount can similarly expose a host directory, but it couples the container to a specific host path and host permissions. Volumes are usually easier for Docker to manage and are the normal choice for durable, write-heavy application data.

Inspecting what Docker is using

  • docker info reports the active storage driver and other daemon details. Check this before interpreting filesystem paths.
  • docker inspect <container> shows mounts, the image reference, network settings and resource-related configuration for one container.
  • docker image inspect <image> exposes image metadata, including its layer-related information.
  • docker volume inspect <volume> shows the volume’s driver and host-side mount location when Docker can report one.

These commands describe configuration; they do not prove that an application is persisting the files you care about. Verify the mount destination inside the container and test replacement or removal before trusting a deployment.

Common misconceptions and failure modes

“A container is a lightweight virtual machine.”

It may package an application with a familiar root filesystem, but ordinary containers share the host kernel. A kernel-level vulnerability, excessive capability or unsafe daemon configuration can cross the intended boundary, which is why isolation should be treated as a security configuration rather than a magical wall.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“The image is modified when the application edits a file.”

The image layers are read-only. The container gets an upper layer or snapshot for changes. Rebuilding an image is the way to make a new immutable application baseline; editing a running container is not an image-release process.

“Removing a container deletes all application data.”

It deletes data that exists only in that container’s writable layer. Data in a named volume, bind mount or other persistent storage remains until that storage is explicitly removed or cleaned up.

“Every host has /var/lib/docker/overlay2.”

That path is associated with the classic overlay2 arrangement. Fresh Engine 29.0+ installations default to the containerd image store, whose image and snapshot data are documented under /var/lib/containerd; upgraded hosts may differ.

“A storage driver is the right place for database durability.”

Storage drivers manage image and container layers. Databases and other write-intensive services should place their durable data in volumes or an appropriate external storage system, then use backups and recovery tests independent of the container lifecycle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical decision checklist

  • Identify the Docker Engine version and confirm whether the containerd image store is active with docker info.
  • Separate disposable image/container-layer data from application data that must survive replacement.
  • Use volumes or deliberate bind mounts for persistent writes; keep temporary caches in the container layer only when losing them is acceptable.
  • Check Linux kernel, rootless requirements, backing filesystem and distribution support before selecting overlay2, fuse-overlayfs, btrfs, zfs or another option.
  • Set cgroup limits appropriate to the workload and monitor the resulting throttling or memory failures.
  • Review namespaces, capabilities, user identity, mounts and network attachments together; no single feature supplies complete security.
  • Test the actual failure path: stop and remove a container, recreate it from the image, and confirm that required data is still present in its persistent mount.

The useful mental model is a stack: Docker configuration is translated by the daemon, containerd and an OCI runtime; namespaces shape what processes can see; cgroups constrain what they can consume; and layered storage supplies an efficient read-only image plus a per-container change area. Once persistent data is moved to volumes and the active storage backend is verified, container replacement becomes a controlled operation rather than a data-loss gamble.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.