Follow commands through the Docker client, host, and registry.
The daemon handles client requests and retrieves images from a registry.
An image provides read-only filesystem content and configuration. Multiple containers can be created from the same image.
Use it to distinguish pull, build, and run and locate image storage and command execution.
Layers & Size
A Docker image consists of read-only layers created by filesystem-changing build instructions.
DockerfileFROM node:20-alpineRUN apk add python3 make g++WORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .RUN npm run buildImagesFiles visible to the container
↔ Drag to explore
Principles and uses
Explore image layers, build caching, and multi-stage builds.
Reuse unchanged build steps and include only runtime files in the final image.
Copy dependency manifests before source for cache reuse. Separate build tools from runtime files. Displayed sizes and times are examples.
Use it to understand Dockerfile ordering, cache invalidation, and image-size reduction.
Container vs Virtual Machine
Virtual machines · Separate guest operating systems
A virtual machine runs a guest operating system and applications on a hypervisor.
Virtual machine serverPhysical server · CPU · RAM · DiskHost OSHypervisor · hardware virtualizationApp A · 20 MBBins / Libs120 MBGuest OSkernel · 2 GBApp B · 20 MBBins / Libs120 MBGuest OSkernel · 2 GBApp C · 20 MBBins / Libs120 MBGuest OSkernel · 2 GB——
↔ Drag to explore
Container · Sharing the Host Kernel
Containers share the host kernel and package the application with its required libraries.
Virtual machine serverPhysical server · CPU · RAM · DiskHost OSHypervisor · hardware virtualizationApp A · 20 MBBins / Libs120 MBGuest OSkernel · 2 GBApp B · 20 MBBins / Libs120 MBGuest OSkernel · 2 GBApp C · 20 MBBins / Libs120 MBGuest OSkernel · 2 GBContainer serverPhysical server · CPU · RAM · DiskHost OS kernel — shared by allDocker Engine · containerd · runcApp A · 20 MBBins / Libs120 MBApp B · 20 MBBins / Libs120 MBApp C · 20 MBBins / Libs120 MB6.4 GB420 MBstart 0.4 sGuest OS ×0
↔ Drag to explore
Principles and uses
Compare how virtual machines and containers use operating systems and kernels.
VMs run separate guest operating systems; containers share the host kernel.
Containers avoid guest-OS boot overhead but share the kernel. Namespaces and cgroups isolate and control resources. Containers can also run within VMs.
Use it to compare isolation, startup costs, resource use, and OS compatibility.
Container Lifecycle
Follow how Docker commands create, start, pause, stop, and remove a container.
Follow creation, startup, pausing, stopping, and removal of a container.
Stopping ends the process; removal also deletes the writable layer.
Run combines creation and startup. Stop signals termination and can force it after a timeout. Restarting the same stopped container preserves its writable layer.
Use it to interpret states, distinguish stopping from removal, and choose persistent storage.
Volumes & Data
No volume · Container-local storage
Without a volume, database files are stored in the container writable layer.
Explore name-based Docker networking and published ports.
Containers on a user-defined network connect by name; external access uses published host ports.
Port mappings forward host traffic to a container port. Separate bridge networks isolate traffic by default and require explicit communication settings.
Use it to design container connections and distinguish internal ports from externally reachable endpoints.
Registry push & pull
A registry stores image manifests and layers. Each manifest identifies its layers by digest.