0
0
Dockerdevops~10 mins

Pushing images from CI 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 Docker Hub in a CI pipeline.

Docker
docker [1] -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
Drag options to blanks, or click blank then click option'
Apush
Brun
Cbuild
Dlogin
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker push' instead of 'docker login' for authentication.
Forgetting to include username or password variables.
2fill in blank
medium

Complete the command to tag a local image before pushing it.

Docker
docker tag myapp:latest [1]/myapp:latest
Drag options to blanks, or click blank then click option'
Amydockerhubuser
Bdockerhub
Clocal
Dregistry
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic names like 'dockerhub' or 'registry' instead of your username.
Skipping the tag step before pushing.
3fill in blank
hard

Fix the error in the push command to upload the image to Docker Hub.

Docker
docker [1] mydockerhubuser/myapp:latest
Drag options to blanks, or click blank then click option'
Apull
Bbuild
Cpush
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker build' or 'docker run' instead of 'docker push'.
Forgetting to tag the image before pushing.
4fill in blank
hard

Fill both blanks to build and push an image in a CI script.

Docker
docker [1] -t mydockerhubuser/myapp:latest . && docker [2] mydockerhubuser/myapp:latest
Drag options to blanks, or click blank then click option'
Abuild
Bpush
Crun
Dlogin
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'run' and 'push' commands.
Trying to push before building the image.
5fill in blank
hard

Fill all three blanks to log in, build, and push an image in a CI pipeline.

Docker
docker [1] -u $DOCKER_USERNAME -p $DOCKER_PASSWORD && docker [2] -t $DOCKER_USERNAME/myapp:latest . && docker [3] $DOCKER_USERNAME/myapp:latest
Drag options to blanks, or click blank then click option'
Alogin
Bpush
Cbuild
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' instead of 'build' or 'push'.
Skipping login before pushing.