Bird
Raised Fist0
Dockerdevops~20 mins

Docker architecture (client, daemon, registry) - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Docker Architecture Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Role of Docker Client in Docker Architecture

What is the primary role of the Docker Client in the Docker architecture?

AIt acts as the user interface to send commands to the Docker Daemon.
BIt manages and runs containers directly on the host system.
CIt stores Docker images and makes them available for download.
DIt builds Docker images from Dockerfiles automatically.
Attempts:
2 left
💡 Hint

Think about which part the user interacts with directly to control Docker.

🧠 Conceptual
intermediate
2:00remaining
Function of Docker Daemon

Which statement best describes the function of the Docker Daemon?

AIt listens for Docker Client requests and manages Docker objects like images and containers.
BIt stores Docker images in a cloud-based registry service.
CIt provides a web interface for managing Docker containers remotely.
DIt compiles Dockerfiles into executable binaries.
Attempts:
2 left
💡 Hint

Consider which component actually runs containers and handles Docker commands.

🧠 Conceptual
advanced
2:00remaining
Purpose of Docker Registry

What is the main purpose of a Docker Registry in the Docker architecture?

AIt manages network connections between Docker containers.
BIt builds Docker images from source code automatically.
CIt stores and distributes Docker images to clients and daemons.
DIt monitors running containers and reports their status.
Attempts:
2 left
💡 Hint

Think about where Docker images are saved and shared from.

🔀 Workflow
advanced
2:30remaining
Sequence of Docker Command Execution

Arrange the steps in the correct order when a user runs docker run command.

A1,3,2,4
B1,2,3,4
C2,1,3,4
D1,2,4,3
Attempts:
2 left
💡 Hint

Think about the logical order from command to container start.

❓ Troubleshoot
expert
3:00remaining
Diagnosing Docker Client and Daemon Communication Issue

A user runs docker ps but gets the error: Cannot connect to the Docker daemon. What is the most likely cause?

AThe container is stopped and cannot be listed.
BDocker Registry is down and cannot provide container images.
CDocker Client has an outdated version incompatible with the Daemon.
DDocker Daemon is not running or not reachable by the Docker Client.
Attempts:
2 left
💡 Hint

Consider what happens if the client cannot talk to the daemon.

Practice

(1/5)
1. Which component of Docker architecture is responsible for sending commands to manage containers?
easy
A. Docker Registry
B. Docker Daemon
C. Docker Client
D. Docker Image

Solution

  1. Step 1: Understand the role of Docker Client

    The Docker Client is the tool users interact with to send commands like docker run or docker build.
  2. Step 2: Differentiate from Daemon and Registry

    The Daemon executes commands, and the Registry stores images, but only the Client sends commands.
  3. Final Answer:

    Docker Client -> Option C
  4. Quick Check:

    Client sends commands = C [OK]
Hint: Client sends commands, Daemon does work, Registry stores images [OK]
Common Mistakes:
  • Confusing Daemon with Client
  • Thinking Registry sends commands
  • Mixing up Image with Client
2. Which of the following commands correctly starts the Docker daemon on a Linux system?
easy
A. systemctl start docker
B. service docker-client start
C. docker daemon run
D. docker start daemon

Solution

  1. Step 1: Identify the correct system command to start Docker daemon

    On Linux, the Docker daemon is managed by systemd and started with systemctl start docker.
  2. Step 2: Eliminate incorrect commands

    docker start daemon and docker daemon run are invalid Docker commands. service docker-client start is incorrect because the daemon is called 'docker', not 'docker-client'.
  3. Final Answer:

    systemctl start docker -> Option A
  4. Quick Check:

    Use systemctl to start Docker daemon = D [OK]
Hint: Use systemctl to manage Docker daemon on Linux [OK]
Common Mistakes:
  • Using docker commands to start daemon directly
  • Confusing client and daemon service names
  • Using service command with wrong service name
3. What will happen when you run docker pull nginx if the image is not present locally?
medium
A. The command fails because image is missing
B. Docker Client builds the image locally
C. Docker Registry sends the image to the Client directly
D. Docker Daemon downloads the image from Docker Registry

Solution

  1. Step 1: Understand the pull command flow

    When docker pull nginx is run, the Client sends the request to the Daemon.
  2. Step 2: Role of Daemon and Registry

    The Daemon downloads the image from the Registry and stores it locally. The Client does not build the image, and the Registry does not send images directly to Client.
  3. Final Answer:

    Docker Daemon downloads the image from Docker Registry -> Option D
  4. Quick Check:

    Pull downloads image via Daemon from Registry = A [OK]
Hint: Pull triggers daemon to fetch image from registry [OK]
Common Mistakes:
  • Thinking Client builds image on pull
  • Assuming Registry sends image directly to Client
  • Believing pull fails if image missing locally
4. You run docker run hello-world but get an error saying the Docker daemon is not running. What is the most likely fix?
medium
A. Restart the Docker Client
B. Start the Docker Daemon service
C. Pull the image manually from the Registry
D. Reinstall Docker Registry

Solution

  1. Step 1: Identify the error cause

    The error indicates the Docker Daemon is not running, so commands cannot be executed.
  2. Step 2: Fix by starting the Daemon

    Starting the Docker Daemon service (e.g., systemctl start docker) will fix the issue. Restarting Client or pulling image manually won't help if Daemon is down.
  3. Final Answer:

    Start the Docker Daemon service -> Option B
  4. Quick Check:

    Daemon must run for commands to work = A [OK]
Hint: Daemon must be running to execute Docker commands [OK]
Common Mistakes:
  • Restarting Client instead of Daemon
  • Trying to pull image without Daemon running
  • Reinstalling Registry unnecessarily
5. You want to push a custom image to a private Docker Registry. Which sequence correctly describes the interaction between Docker components?
hard
A. Client builds image -> Daemon pushes image -> Registry stores image
B. Daemon builds image -> Client pushes image -> Registry stores image
C. Registry builds image -> Client pushes image -> Daemon stores image
D. Client builds image -> Registry pushes image -> Daemon stores image

Solution

  1. Step 1: Understand image build and push roles

    The Client sends build commands; the Daemon builds the image locally.
  2. Step 2: Understand push process

    The Client commands the Daemon to push the image; the Daemon uploads it to the Registry, which stores it.
  3. Step 3: Eliminate incorrect sequences

    Daemon does not push without Client command; Registry does not build or push images; Daemon stores images locally, not pushed images.
  4. Final Answer:

    Client builds image -> Daemon pushes image -> Registry stores image -> Option A
  5. Quick Check:

    Client commands, Daemon acts, Registry stores = B [OK]
Hint: Client commands, Daemon acts, Registry stores images [OK]
Common Mistakes:
  • Thinking Registry builds or pushes images
  • Mixing roles of Client and Daemon
  • Assuming Daemon stores pushed images
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard