CompTIA Linux+ (XK0-005) — Question 59
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?
Answer options
- A. docker export <container_id>
- B. docker info <container_id>
- C. docker start <container_id>
- D. docker inspect <container_id>
Correct answer: D
Explanation
The correct command is 'docker inspect <container_id>' which provides detailed information about the container, including its configuration and the command that is executed when it starts. The other options do not give this specific execution information: 'docker export' is used for exporting the filesystem, 'docker info' provides system-wide information, and 'docker start' simply starts the container but does not reveal the command executed.