DCA · Question #106
Will this command display a list of volumes for a specific container? Solution: docker container logs nginx --volumes'
The correct answer is B. No. The docker container logs command retrieves log output from a container, and it does not have a --volumes flag to display volume information.
Question
Will this command display a list of volumes for a specific container? Solution: docker container logs nginx --volumes'
Options
- AYes
- BNo
How the community answered
(69 responses)- A6% (4)
- B94% (65)
Why each option
The `docker container logs` command retrieves log output from a container, and it does not have a `--volumes` flag to display volume information.
The `--volumes` flag is not a valid option for the `docker container logs` command, which is exclusively for retrieving log output.
No. The `docker container logs` command is used to fetch the logs produced by a running container, and it does not have an option like `--volumes` to display information about a container's mounted volumes. Volume information is found via `docker container inspect`.
Concept tested: Docker container logging vs. volume information
Source: https://docs.docker.com/engine/reference/commandline/container_logs/
Topics
Community Discussion
No community discussion yet for this question.