0
0
Dockerdevops~20 mins

Registry mirroring concept in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Registry Mirror Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the main purpose of a Docker registry mirror?

Choose the best explanation for why a Docker registry mirror is used in a development environment.

ATo automatically update Docker images to the latest version without manual intervention.
BTo cache images locally to speed up image pulls and reduce bandwidth usage.
CTo create a backup of all Docker images in case the main registry fails.
DTo convert Docker images into a different container format for compatibility.
Attempts:
2 left
💡 Hint

Think about how mirrors help when many users pull the same images repeatedly.

💻 Command Output
intermediate
1:30remaining
What is the output of the Docker daemon when configured with a registry mirror?

Given the Docker daemon configuration below, what message will appear in the daemon logs when pulling an image?

Docker
{
  "registry-mirrors": ["https://mirror.example.com"]
}
AUsing registry mirror https://mirror.example.com for image pulls
BDocker daemon failed to start due to invalid configuration
CPulling image directly from Docker Hub without mirror
DError: registry mirror URL invalid, falling back to default registry
Attempts:
2 left
💡 Hint

Check how Docker logs registry mirror usage when configured correctly.

Configuration
advanced
2:00remaining
Which Docker daemon.json configuration correctly sets up two registry mirrors?

Select the valid JSON configuration to set two registry mirrors: https://mirror1.example.com and https://mirror2.example.com.

A
{
  "registry-mirrors": ["https://mirror1.example.com" "https://mirror2.example.com"]
}
B
{
  "registry-mirrors": "https://mirror1.example.com, https://mirror2.example.com"
}
C
{
  "registry-mirrors": ["https://mirror1.example.com", "https://mirror2.example.com"]
}
D
{
  "registry-mirrors": {"mirror1": "https://mirror1.example.com", "mirror2": "https://mirror2.example.com"}
}
Attempts:
2 left
💡 Hint

Remember that JSON arrays require commas between items.

Troubleshoot
advanced
2:00remaining
Why does Docker ignore the configured registry mirror and pull directly from Docker Hub?

You configured a registry mirror in daemon.json, but Docker still pulls images directly from Docker Hub. What is the most likely cause?

ADocker Hub disables mirror usage for official images.
BDocker daemon does not support registry mirrors on Linux systems.
CThe mirror URL must be set in the Dockerfile, not daemon.json.
DThe registry mirror URL is unreachable or returns errors, so Docker falls back to Docker Hub.
Attempts:
2 left
💡 Hint

Check network connectivity and mirror server health.

🔀 Workflow
expert
2:30remaining
Order the steps to configure and verify a Docker registry mirror on a Linux host

Arrange the steps below in the correct order to set up and confirm a Docker registry mirror is working.

A4,1,2,3
B1,4,2,3
C4,2,1,3
D1,2,4,3
Attempts:
2 left
💡 Hint

Think about verifying the mirror before configuring and restarting Docker.