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 2 Question 43 Discussion

Actual exam question for CompTIA's XK0-005 exam
Question #: 43
Topic #: 2
[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:

Queen
2 months ago
Wow, some of these options are really out there. It's like they're trying to trick us with a bunch of irrelevant commands. B is the clear winner here, no doubt about it.
upvoted 0 times
Josefa
1 months ago
D) docker ps WEB -f
upvoted 0 times
...
Thaddeus
1 months ago
C) docker run --name WEB --volume /dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Sherron
1 months ago
B) docker logs WEB
upvoted 0 times
...
Aleshia
1 months ago
A) docker-compose inspect WEB
upvoted 0 times
...
...
Jolanda
2 months ago
A? Inspect the web server? Nah, that's for general container info, not error logs. B is the answer, and it's the one that won't make my head hurt trying to remember all those flags.
upvoted 0 times
...
Paz
2 months ago
I personally think option C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log would be more effective in generating the errors.
upvoted 0 times
...
Elliot
2 months ago
D? Really? That's just for listing running containers, not getting the logs. Gotta go with B here, it's the classic go-to for this kind of issue.
upvoted 0 times
Catalina
1 months ago
C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Buffy
1 months ago
B? Definitely, docker logs is the way to go for viewing container logs.
upvoted 0 times
...
Shannan
1 months ago
C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Portia
2 months ago
B) docker logs WEB
upvoted 0 times
...
Sean
2 months ago
A) docker-compose inspect WEB
upvoted 0 times
...
...
Dottie
3 months ago
C is interesting, but it seems a bit overkill just to view some error logs. I'd stick with the good old 'docker logs' command.
upvoted 0 times
Donte
2 months ago
C) docker run ---name WEB ---volume/dev/stdout:/var/log/nginx/error.log
upvoted 0 times
...
Dorian
2 months ago
B) docker logs WEB
upvoted 0 times
...
King
2 months ago
A) docker-compose inspect WEB
upvoted 0 times
...
...
Royal
3 months ago
I agree with Elliott, using docker logs WEB would be the best way to see the error output.
upvoted 0 times
...
Elliott
3 months ago
I think the administrator should use option B) docker logs WEB to generate the errors.
upvoted 0 times
...
Mitsue
3 months ago
Option B is the way to go, it's the easiest and most straightforward way to view the container's logs. No need to mess with volumes or fancy commands.
upvoted 0 times
Shonda
1 months ago
Thanks for the tip, I'll try using docker logs next time I need to check for errors.
upvoted 0 times
...
Ora
2 months ago
I agree, it's the simplest option to troubleshoot the container.
upvoted 0 times
...
Paris
2 months ago
That's correct, using docker logs WEB will display the error output for the container.
upvoted 0 times
...
Hyun
2 months ago
B) docker logs WEB
upvoted 0 times
...
...

Save Cancel