0
0
Dockerdevops~10 mins

Image tags and versioning 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 the latest version of the nginx image.

Docker
docker pull nginx:[1]
Drag options to blanks, or click blank then click option'
Alatest
Bstable
Cold
Dnewest
Attempts:
3 left
💡 Hint
Common Mistakes
Using tags like 'old' or 'newest' which do not exist.
Forgetting to specify a tag and expecting a specific version.
2fill in blank
medium

Complete the command to tag a local image with version 1.2 before pushing.

Docker
docker tag myapp:dev myrepo/myapp:[1]
Drag options to blanks, or click blank then click option'
A1.2
Blatest
Cstable
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'dev' as a version tag when pushing to a repository.
Using 'latest' when a specific version is required.
3fill in blank
hard

Fix the error in the command to push version 2.0 of the image to the repository.

Docker
docker push myrepo/myapp:[1]
Drag options to blanks, or click blank then click option'
Av2.0
B2.0
Cversion2
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Using incomplete or mismatched tags causing push failures.
Adding prefixes not matching the tag format.
4fill in blank
hard

Fill both blanks to build an image named 'webapp' with version 3.5 from the current directory.

Docker
docker build -t [1]:[2] .
Drag options to blanks, or click blank then click option'
Awebapp
B3.5
Clatest
Dapp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' as version when a specific version is requested.
Using wrong image names.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps image names to their version tags if the version is greater than 1.0.

Docker
versions = {name: [1] for name, [2] in images.items() if [3] > 1.0}
Drag options to blanks, or click blank then click option'
Atag
Dversion
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent variable names causing errors.
Using the wrong variable in the condition.