ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 1 - DCA discussion

Report
Export

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

Solution. 'docker container inspect nginx'

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

This command will not display a list of volumes for a specific container, as it will show detailed information on the container itself, such as its configuration, network settings, state, and log path1.To display a list of volumes for a specific container, you need to use the--formatoption with a custom template that filters the output by theMountsfield2. For example, the following command will show the source and destination of the volumes mounted in the nginx container:

docker container inspect --format=' { {range .Mounts}} { {.Source}} -> { {.Destination}} { {end}}' nginxReference:

docker container inspect | Docker Docs

How to Use Docker Inspect Command - Linux Handbook

asked 08/11/2024
Vusani Nedzungani
50 questions
NextNext
User
Your answer:
0 comments
Sorted by

Leave a comment first