nerdexam
CompTIA

XK0-005 · Question #537

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…

The correct answer is D. docker inspect <container_id>. 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…

Scripting, Containers, and Automation

Question

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?

Options

  • Adocker export <container_id>
  • Bdocker info <container_id>
  • Cdocker start <container_id>
  • Ddocker inspect <container_id>

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    3% (1)
  • D
    89% (32)

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.

Topics

#Docker#Containers#Container Troubleshooting#docker inspect

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice