0
0
Dockerdevops~10 mins

Setting up private registry in Docker - Interactive Practice

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

Complete the command to start a private Docker registry container.

Docker
docker run -d -p 5000:5000 --name registry [1] registry:2
Drag options to blanks, or click blank then click option'
A--restart always
B--network host
C-it
D--rm
Attempts:
3 left
💡 Hint
Common Mistakes
Using --rm removes the container after it stops, which is not desired for a registry.
Using -it is for interactive mode, not needed here.
Using --network host changes networking and is not required.
2fill in blank
medium

Complete the command to tag a local image for pushing to the private registry.

Docker
docker tag myapp:latest localhost[1]5000/myapp:latest
Drag options to blanks, or click blank then click option'
A.
B/
C-
D:
Attempts:
3 left
💡 Hint
Common Mistakes
Using / between host and port creates an invalid registry address.
Using dash or dot is invalid in this context.
3fill in blank
hard

Fix the error in the command to push the image to the private registry.

Docker
docker push localhost:5000[1]myapp:latest
Drag options to blanks, or click blank then click option'
A:
B/
C-
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using colon before image name causes Docker to look for a tag, not a path.
Using dash or dot is invalid syntax.
4fill in blank
hard

Fill both blanks to create a secure registry with TLS certificates.

Docker
docker run -d -p 5000:5000 --name registry -v [1]:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=[2]/cert.pem -e REGISTRY_HTTP_TLS_KEY=[2]/key.pem registry:2
Drag options to blanks, or click blank then click option'
A/home/user/certs
B/etc/ssl
C/certs
D/var/lib/registry
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong container path causes registry to not find certificates.
Mounting wrong local directory means certificates won't be available.
5fill in blank
hard

Fill all three blanks to configure Docker daemon to trust the private registry.

Docker
{
  "insecure-registries": ["[1]:[2]"],
  "debug": [3]
}
Drag options to blanks, or click blank then click option'
Alocalhost
B5000
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong host or port prevents Docker from trusting the registry.
Setting debug to false disables helpful logs during setup.