0
0
Dockerdevops~10 mins

Removing images 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 remove a Docker image by its ID.

Docker
docker image [1] IMAGE_ID
Drag options to blanks, or click blank then click option'
Arun
Bpull
Crm
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull' instead of 'rm' will try to download an image.
Using 'run' tries to start a container, not remove an image.
2fill in blank
medium

Complete the command to force remove a Docker image even if it is used by stopped containers.

Docker
docker image rm [1] IMAGE_ID
Drag options to blanks, or click blank then click option'
A--force
B--quiet
C--all
D--no-cache
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--all' removes all images, not just one.
Using '--quiet' only suppresses output, does not force removal.
3fill in blank
hard

Fix the error in the command to remove all dangling images.

Docker
docker image rm $(docker images -f [1] -q)
Drag options to blanks, or click blank then click option'
Aall=true
Bdangling=false
Clabel=unused
Ddangling=true
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'dangling=false' selects images that are in use.
Using 'all=true' is not a valid filter.
4fill in blank
hard

Fill both blanks to remove all images that are not used by any container.

Docker
docker image prune [1] [2]
Drag options to blanks, or click blank then click option'
A-a
B--force
C--all
D--quiet
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one option may not remove all images or may ask for confirmation.
Using '--quiet' only suppresses output, does not remove images.
5fill in blank
hard

Fill both blanks to remove images by name, force removal.

Docker
docker image rm [1] [2] IMAGE_NAME
Drag options to blanks, or click blank then click option'
A--force
B--quiet
C-f
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Using both '-f' and '--force' is redundant but allowed; here the order matters.
Using '--quiet' or '-q' will cause an error as they are invalid flags.