0
0
Dockerdevops~10 mins

Pulling from private registries 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 log in to a private Docker registry.

Docker
docker [1] myregistry.example.com
Drag options to blanks, or click blank then click option'
Apull
Bpush
Clogin
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker pull' instead of 'docker login' to authenticate.
Trying to use 'docker run' to log in.
2fill in blank
medium

Complete the command to pull an image from a private registry after login.

Docker
docker [1] myregistry.example.com/myimage:latest
Drag options to blanks, or click blank then click option'
Alogin
Bpull
Cpush
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker login' instead of 'docker pull' to get images.
Using 'docker push' which uploads images instead of downloading.
3fill in blank
hard

Fix the error in the command to pull from a private registry by adding the missing option.

Docker
docker pull [1]/myimage:latest
Drag options to blanks, or click blank then click option'
Amyregistry.example.com
Blatest
Cdocker.io
Dlibrary
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the registry URL causes Docker to look in the public registry.
Using 'latest' or 'library' instead of the registry URL.
4fill in blank
hard

Fill both blanks to create a Docker config file path and command to use it for authentication.

Docker
docker --config [1] [2] myregistry.example.com
Drag options to blanks, or click blank then click option'
A~/.docker
Blogin
Cpull
D/etc/docker
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull' instead of 'login' with the config option.
Using '/etc/docker' which is less common for user config.
5fill in blank
hard

Fill the blanks to create a command that logs in with username and password from environment variables.

Docker
echo $[1] | docker login myregistry.example.com -u $[2] --password-stdin
Drag options to blanks, or click blank then click option'
APASSWORD
BUSERNAME
CUSER
DPASS
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up USER and USERNAME variables.
Not using --password-stdin to securely pass the password.