0
0
Dockerdevops~5 mins

Container disk usage management in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What command shows the disk space used by Docker images, containers, volumes, and build cache?
The command docker system df displays disk usage by Docker images, containers, volumes, and build cache.
Click to reveal answer
beginner
How can you remove all stopped containers to free up disk space?
Use docker container prune to remove all stopped containers and free disk space.
Click to reveal answer
intermediate
What does the command docker image prune -a do?
It removes all unused images, including dangling and unreferenced images, freeing disk space.
Click to reveal answer
beginner
Why should you manage Docker volumes regularly?
Unused volumes can take up disk space. Running docker volume prune removes unused volumes to save space.
Click to reveal answer
intermediate
What is the effect of docker system prune?
It removes stopped containers, unused networks, dangling images, and build cache to free disk space.
Click to reveal answer
Which command shows detailed disk usage of Docker resources?
Adocker system df
Bdocker ps
Cdocker images
Ddocker info
How do you remove all stopped containers at once?
Adocker rm -f
Bdocker container prune
Cdocker image prune
Ddocker volume prune
What does docker image prune -a remove?
AOnly dangling images
BAll volumes
CAll containers
DAll unused images
Which command removes unused Docker volumes?
Adocker system prune
Bdocker volume rm
Cdocker volume prune
Ddocker container prune
What does docker system prune NOT remove by default?
ARunning containers
BUnused networks
CDangling images
DStopped containers
Explain how to check and clean up disk space used by Docker containers, images, and volumes.
Think about commands that show usage and commands that remove unused resources.
You got /4 concepts.
    Describe the difference between removing dangling images and all unused images in Docker.
    Focus on the meaning of dangling vs unused images and the prune command flags.
    You got /4 concepts.