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?
A.
docker-compose inspect WEB
B.
docker logs WEB
C.
docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
The docker logs command retrieves logs, including errors, for a running container. By using docker logs WEB, the administrator can check the error output generated by the web server container and debug any issues related to application performance or errors.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit