Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA Exam XK0-005 Topic 4 Question 37 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 37
Topic #: 4
[All XK0-005 Questions]

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?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

Reiko
30 days ago
I bet the person who wrote this question is a secret comedian. 'docker-compose inspect WEB'? That's hilarious!
upvoted 0 times
...
Flo
1 months ago
B) all the way! Who needs fancy volume mounts when you can just use the good old 'docker logs' command?
upvoted 0 times
Dick
17 days ago
B) all the way! Who needs fancy volume mounts when you can just use the good old 'docker logs' command?
upvoted 0 times
...
Serina
18 days ago
C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Melvin
22 days ago
B) docker logs WEB
upvoted 0 times
...
Jimmie
23 days ago
A) docker-compose inspect WEB
upvoted 0 times
...
...
Leila
1 months ago
I would go with option B) docker logs WEB as well, it's a straightforward way to check for errors in the container.
upvoted 0 times
...
Chantell
2 months ago
Hmm, D) docker ps WEB -f doesn't seem right. That's just going to show me the running containers, not the logs.
upvoted 0 times
...
Laurene
2 months ago
A) docker-compose inspect WEB? Really? I'm not trying to inspect the container, I just want to see the errors!
upvoted 0 times
Gilberto
1 months ago
C) docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Ressie
1 months ago
B) docker logs WEB
upvoted 0 times
...
...
Hana
2 months ago
I think option C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log could also work, as it redirects the error output to a log file.
upvoted 0 times
...
Sheldon
2 months ago
I agree with Theodora, option B) docker logs WEB seems like the best choice to generate the errors.
upvoted 0 times
...
Thaddeus
2 months ago
I think C) is the way to go. Mapping the container's error log to the host's stdout is a neat trick!
upvoted 0 times
Rueben
1 months ago
I agree, it's a clever way to generate the errors on the container.
upvoted 0 times
...
Lai
2 months ago
Yeah, that sounds like a good solution.
upvoted 0 times
...
Kindra
2 months ago
I think C) is the way to go. Mapping the container's error log to the host's stdout is a neat trick!
upvoted 0 times
...
...
Pearly
2 months ago
B) docker logs WEB is the correct answer. This command will display the logs for the 'web' container, including any error output.
upvoted 0 times
Merissa
2 months ago
Go ahead and give it a try, let's see if it works.
upvoted 0 times
...
Freeman
2 months ago
Should I try running it now?
upvoted 0 times
...
Goldie
2 months ago
Yes, that command will show the error output for the 'web' container.
upvoted 0 times
...
Bethanie
2 months ago
I think the answer is B) docker logs WEB.
upvoted 0 times
...
...
Theodora
2 months ago
I think the administrator should use option B) docker logs WEB.
upvoted 0 times
...

Save Cancel