nerdexam
CompTIA

XK0-005 · Question #695

An administrator is running a web server in a container named WEB, but none of the error output is showing. Which of the following should the administrator use to generate the errors on the container?

The correct answer is B. docker logs WEB. The docker logs command is used to view the logs of a container, including error outputs. Running docker logs WEB will display all the standard output and error logs generated by the container named WEB. This command is commonly used to troubleshoot issues and check error logs…

Troubleshooting

Question

An administrator is running a web server in a container named WEB, but none of the error output is showing. Which of the following should the administrator use to generate the errors on the container?

Options

  • Adocker-compose inspect WEB
  • Bdocker logs WEB
  • Cdocker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
  • Ddocker ps WEB -f

How the community answered

(64 responses)
  • A
    5% (3)
  • B
    86% (55)
  • C
    2% (1)
  • D
    8% (5)

Explanation

The docker logs command is used to view the logs of a container, including error outputs. Running docker logs WEB will display all the standard output and error logs generated by the container named WEB. This command is commonly used to troubleshoot issues and check error logs for containers.

Topics

#Docker#Container Logging#Troubleshooting#CLI

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice