0
0
Dockerdevops~10 mins

Tagging images during build 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 tag the Docker image as 'myapp:latest' during build.

Docker
docker build -t myapp[1] .
Drag options to blanks, or click blank then click option'
A-latest
B:latest
C latest
D/latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash instead of a colon to separate the tag
Adding a space before the tag
Using a slash instead of a colon
2fill in blank
medium

Complete the command to tag the image with a version number 'v1.0' during build.

Docker
docker build -t myapp[1] .
Drag options to blanks, or click blank then click option'
A:v1.0
B v1.0
C-v1.0
D/v1.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash instead of a colon
Adding spaces before the tag
Using a slash instead of a colon
3fill in blank
hard

Fix the error in the command to tag the image as 'myapp:prod'.

Docker
docker build -t myapp[1] .
Drag options to blanks, or click blank then click option'
A prod
B/prod
C:prod
D-prod
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a space before the tag
Using a dash or slash instead of a colon
4fill in blank
hard

Complete the code to tag the image as 'myapp' with version '2.1' during build.

Docker
docker build -t myapp:[1] .
Drag options to blanks, or click blank then click option'
A:
B-
C2.1
Dv2.1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash instead of colon
Adding 'v' before the version number when not required
5fill in blank
hard

Fill both blanks to tag the 'myapp' image with version '3.0' to 'myrepo/myapp:3.0'.

Docker
docker tag myapp:[1] myrepo/myapp[2]
Drag options to blanks, or click blank then click option'
A:
B3.0
C:3.0
D/
Attempts:
3 left
💡 Hint
Common Mistakes
Using slash instead of colon for tags
Including the version tag without colon
Mixing separators between source and target