0
0
Dockerdevops~10 mins

Registry mirroring concept in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to pull an image from a mirrored registry.

Docker
docker pull [1]/library/nginx:latest
Drag options to blanks, or click blank then click option'
Alocalhost
Bdocker.io
Cmirror.example.com
Dregistry.local
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker.io' pulls from the default registry, not the mirror.
Using 'localhost' assumes the mirror is local, which may not be true.
2fill in blank
medium

Complete the configuration file snippet to set up a registry mirror in Docker daemon.

Docker
{
  "registry-mirrors": ["[1]"]
}
Drag options to blanks, or click blank then click option'
Ahttp://registry.local
Bhttps://mirror.example.com
Chttps://docker.io
Dhttp://localhost:5000
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the protocol causes Docker to ignore the mirror.
Using the default registry URL does not set up mirroring.
3fill in blank
hard

Fix the error in the command to start a local registry mirror container.

Docker
docker run -d -p 5000:5000 --name registry-mirror [1]
Drag options to blanks, or click blank then click option'
Aregistry:2
Bregistry-mirror:latest
Cmirror-registry:1
Ddocker/registry
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-existent or incorrect image names causes container start failure.
Using unofficial images may not provide the registry functionality.
4fill in blank
hard

Fill both blanks to configure Docker daemon to use a mirror and disable the default registry.

Docker
{
  "registry-mirrors": ["[1]"],
  "insecure-registries": ["[2]"]
}
Drag options to blanks, or click blank then click option'
Ahttps://mirror.example.com
Bmirror.example.com
Cdocker.io
Dlocalhost:5000
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same format for both settings causes configuration errors.
Omitting the port in 'insecure-registries' when needed causes connection failures.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters images from the mirror with size greater than 100MB.

Docker
filtered_images = {img: size [1] size for img, size in images.items() if size [2] [3]
Drag options to blanks, or click blank then click option'
A*
B>
C100 * 1024 * 1024
D**
Attempts:
3 left
💡 Hint
Common Mistakes
Using '**' instead of '*' causes exponentiation, not multiplication.
Using '<' instead of '>' changes the filter logic.
Using raw 100 instead of bytes causes incorrect filtering.