Which of the following can the administrator use to verify the root directory has this file?

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
B . docker container inspect
C . docker exec <container_name> ls
D . docker ps <container_name>

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.

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

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments