3. Docker Architecture
Trace a Docker command through the client, daemon, registry, and runtime.
Main Components
| Component | Responsibility |
|---|---|
| Docker CLI | Sends commands to the selected Docker endpoint |
| Docker daemon | Manages images, containers, networks, and volumes |
| Registry | Stores and distributes images |
| Container runtime | Creates and runs container processes |
The daemon can run on a different machine from the CLI. Bind-mount paths refer to the daemon host, which matters when using a remote context.
What Happens During docker run?
The daemon resolves the image locally or pulls it when needed, prepares the container filesystem and configuration, and starts the configured process.
Inspect the Environment
docker context show
docker info
docker image ls
docker container ls -a
Images and containers are separate resources. An image can exist without a running container, and many containers can use the same image.
Practice
Find one image and list containers created from it. Identify which commands inspect stored artifacts and which inspect runtime instances.
Quick Interview Answer
Docker uses a client-server architecture. The client talks to the daemon, which manages local resources and uses registries to obtain or publish images.
Previous: 2. Installation and Verification | Next: 4. Container Lifecycle
Add More Questions to This Guide
Know a question that should be here? Share it and help the community!
Open Google Form