ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 64 - XK0-005 discussion

Report
Export

A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts?

A.
docker export <container_id>
Answers
A.
docker export <container_id>
B.
docker info <container_id>
Answers
B.
docker info <container_id>
C.
docker start <container_id>
Answers
C.
docker start <container_id>
D.
docker inspect <container_id>
Answers
D.
docker inspect <container_id>
Suggested answer: D

Explanation:

The command that will allow the administrator to determine the first command that is executed inside the container right after it starts is docker inspect <container_id>. This command will display detailed information about the container, including its configuration, state, network settings, mounts, and logs. One of the configuration fields is "Entrypoint", which shows the command that is executed when the container is run. The entrypoint can be specified in the Dockerfile or overridden at runtime using the --entrypoint option.

The other options are not correct commands for determining the first command that is executed inside the container. The docker export <container_id> command will export the contents of the container's filesystem as a tar archive to STDOUT. This will not show the entrypoint of the container, but only its files. The docker info <container_id> command is invalid because docker info does not take any arguments. It shows system-wide information about Docker, such as the number of containers, images, volumes, networks, and storage drivers. The docker start <container_id> command will start a stopped container and attach its STDOUT and STDERR to the terminal. This will not show the entrypoint of the container, but only its output. Reference: docker inspect | Docker Docs; docker export | Docker Docs; docker info | Docker Docs; docker start | Docker Docs

asked 02/10/2024
Andrew ROUSE
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first