DCA · Question #6
A server is running low on disk space. What command can be used to check the disk usage of images, containers, and volumes for Docker engine?
The correct answer is A. 'docker system df'. To ascertain the disk usage of Docker components like images, containers, and volumes, the docker system df command is the appropriate tool.
Question
A server is running low on disk space. What command can be used to check the disk usage of images, containers, and volumes for Docker engine?
Options
- A'docker system df'
- B'docker system prune'
- C'docker system free'
- D'docker system ps'
How the community answered
(43 responses)- A91% (39)
- B2% (1)
- C5% (2)
- D2% (1)
Why each option
To ascertain the disk usage of Docker components like images, containers, and volumes, the `docker system df` command is the appropriate tool.
The `docker system df` command provides a summary of the disk space consumed by various Docker objects, including images, containers, local volumes, and build cache, making it ideal for checking disk usage.
`docker system prune` is used to remove unused Docker objects and *free up* disk space, rather than to report on current disk usage.
`docker system free` is not a valid or recognized command within the Docker CLI.
`docker system ps` is not a valid Docker command; `docker ps` is used to list running containers, but `docker system` does not have a `ps` subcommand.
Concept tested: Checking Docker disk usage
Source: https://docs.docker.com/engine/reference/commandline/system_df/
Topics
Community Discussion
No community discussion yet for this question.