ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 174 - XK0-005 discussion

Report
Export

A systems administrator needs to verify whether the built container has the app.go file in its root directory. Which of the following can the administrator use to verify the root directory has this file?

A.
docker image inspect
Answers
A.
docker image inspect
B.
docker container inspect
Answers
B.
docker container inspect
C.
docker exec <container_name> ls
Answers
C.
docker exec <container_name> ls
D.
docker ps <container_name>
Answers
D.
docker ps <container_name>
Suggested answer: C

Explanation:

The docker exec <container_name> ls command can be used to verify whether the built container has the app.go file in its root directory. This command will run the ls command inside the specified container and list the files and directories in its root directory. If the app.go file is present, it will be displayed in the output. The docker image inspect command will display information about an image, not a container, and it will not list the files inside the image. The docker container inspect command will display information about a container, not its files. The docker ps <container_name> command is invalid, as ps does not accept a container name as an argument. Reference: CompTIA

Linux+ (XK0-005) Certification Study Guide, Chapter 16: Virtualization and Cloud Technologies, page 499.

asked 02/10/2024
Ariel Acosta
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first