ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 250 - XK0-005 discussion

Report
Export

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

A.
docker-compose inspect WEB
Answers
A.
docker-compose inspect WEB
B.
docker logs WEB
Answers
B.
docker logs WEB
C.
docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
Answers
C.
docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
D.
docker ps WEB -f
Answers
D.
docker ps WEB -f
Suggested answer: B

Explanation:

Thedocker logscommand is used to fetch the logs of a container.If the error output is not showing for a running container, thedocker logscommand can be used to view these details56.

Reference: 5(https://www.docker.com/blog/how-to-fix-and-debug-docker-containers-like-a-superhero/) 6(https://stackoverflow.com/questions/33083385/getting-console-output-from-a-docker-container)

asked 02/10/2024
Felipe Santos Cardoso
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first