0
0
Dockerdevops~10 mins

Docker Hub public and private repos - 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 a public image from Docker Hub.

Docker
docker pull [1]
Drag options to blanks, or click blank then click option'
Amyprivate/image
Bnginx
Clocalhost/image
Dmyimage:latest
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to pull a private image without login
Using localhost as image source
2fill in blank
medium

Complete the command to log in to Docker Hub before pulling a private image.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Apull
Bpush
Clogin
Dlogout
Attempts:
3 left
💡 Hint
Common Mistakes
Using docker pull without login
Using docker push instead of login
3fill in blank
hard

Fix the error in the command to push an image to a private Docker Hub repo.

Docker
docker push [1]
Drag options to blanks, or click blank then click option'
Alocalhost/myimage
Bimage:latest
Cmyimage
Dusername/myimage
Attempts:
3 left
💡 Hint
Common Mistakes
Pushing image without username prefix
Using localhost in image name
4fill in blank
hard

Fill both blanks to tag a local image for your private Docker Hub repo.

Docker
docker tag [1] [2]
Drag options to blanks, or click blank then click option'
Amyapp
Busername/myapp:latest
Cmyapp:latest
Dusername/myapp
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping source and target tags
Missing tag in image names
5fill in blank
hard

Fill all three blanks to create a private repo, log in, and push an image.

Docker
docker [1] && docker [2] && docker push [3]
Drag options to blanks, or click blank then click option'
Alogin
Btag username/myapp:latest
Cusername/myapp:latest
Dbuild -t username/myapp:latest .
Attempts:
3 left
💡 Hint
Common Mistakes
Pushing before login
Not tagging image before push
Wrong order of commands