ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 113 - DCA discussion

Report
Export

Will this command display a list of volumes for a specific container?

Solution. 'docker container logs nginx --volumes'

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

: The commanddocker container logs nginx --volumeswillnotdisplay a list of volumes for a specific container.Thedocker container logscommand shows the logs of a container, which are usually the standard output and standard error of the main process running in the container1.The--volumesflag is not a valid option for this command, and will result in an error message2.To display a list of volumes for a specific container, you can use thedocker inspectcommand with a filter option, such asdocker inspect -f '{{ .Mounts }}' nginx3.This will show the source, destination, mode, type, and propagation of each volume mounted in the container4.Reference:docker container logs,docker container logs nginx --volumes,docker inspect,docker inspect -f '{{ .Mounts }}' nginx

asked 08/11/2024
Kameron Katoku
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first