nerdexam
CompTIACompTIA

XK0-005 · Question #1690

XK0-005 Question #1690: Real Exam Question with Answer & Explanation

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 fo

Scripting, Containers, and Automation

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

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#Containers#Logging#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions