Cyber Monday 2024! 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
2 months ago
I bet the person who wrote this question is a secret comedian. 'docker-compose inspect WEB'? That's hilarious!
upvoted 0 times
...
Flo
2 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
2 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
...
Serina
2 months ago
C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Melvin
2 months ago
B) docker logs WEB
upvoted 0 times
...
Jimmie
2 months ago
A) docker-compose inspect WEB
upvoted 0 times
...
...
Leila
3 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
3 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
3 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
3 months ago
C) docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Ressie
3 months ago
B) docker logs WEB
upvoted 0 times
...
...
Hana
3 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
3 months ago
I agree with Theodora, option B) docker logs WEB seems like the best choice to generate the errors.
upvoted 0 times
...
Thaddeus
4 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
2 months ago
I agree, it's a clever way to generate the errors on the container.
upvoted 0 times
...
Lai
3 months ago
Yeah, that sounds like a good solution.
upvoted 0 times
...
Kindra
3 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
4 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
3 months ago
Go ahead and give it a try, let's see if it works.
upvoted 0 times
...
Freeman
3 months ago
Should I try running it now?
upvoted 0 times
...
Goldie
3 months ago
Yes, that command will show the error output for the 'web' container.
upvoted 0 times
...
Bethanie
3 months ago
I think the answer is B) docker logs WEB.
upvoted 0 times
...
...
Theodora
4 months ago
I think the administrator should use option B) docker logs WEB.
upvoted 0 times
...

Save Cancel