Bird
0
0

After running docker container prune, what happens to the disk space used by stopped containers?

medium📝 Command Output Q5 of 15
Docker - Resource Management
After running docker container prune, what happens to the disk space used by stopped containers?
ADisk space is freed by removing all stopped containers
BDisk space remains unchanged because containers are only paused
COnly running containers are removed, so no disk space is freed
DVolumes attached to containers are also deleted
Step-by-Step Solution
Solution:
  1. Step 1: Understand the effect of 'docker container prune'

    This command removes all stopped containers, freeing their disk space.
  2. Step 2: Clarify what is removed

    Running containers remain; volumes are not deleted by this command.
  3. Final Answer:

    Disk space is freed by removing all stopped containers -> Option A
  4. Quick Check:

    Container prune frees space by removing stopped containers [OK]
Quick Trick: Prune removes stopped containers and frees disk space [OK]
Common Mistakes:
  • Thinking containers are only paused, not removed
  • Assuming volumes are deleted with containers
  • Confusing running containers with stopped ones

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes