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

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

An operations engineer is planning to start a container running a PostgreSQL database. The engineer wants the container to start automatically at system startup, mount the /home/db directory as /var/lib/postgresql inside the container, and expose port 5432 to the OS. Which of the following commands should the engineer run to achieve this task?

Show Suggested Answer Hide Answer
Suggested Answer: A

systemctl status httpd is the correct option to check if the Apache web server (httpd) is running. The systemctl status command provides detailed information about the service, including whether it is active and running.


Contribute your Thoughts:

Devora
19 days ago
Wait, is it just me or does option A sound like a recipe for a delicious PostgreSQL-infused docker stew?
upvoted 0 times
...
Julio
21 days ago
Option D is a bit of a mess. The --init, --restart, and --workdir flags don't seem to be used correctly in this context.
upvoted 0 times
...
Jolene
22 days ago
Option C doesn't look right. The --attach flag is likely for attaching to a running container, not starting a new one. And the --platform flag doesn't seem relevant here.
upvoted 0 times
...
My
28 days ago
I'm not sure about option B. The --volume flag seems to have the directory order reversed compared to option A.
upvoted 0 times
Tom
16 days ago
User 1: Option A looks correct. The -v flag should be used to specify the volume mapping.
upvoted 0 times
...
...
Eulah
1 months ago
Option A seems correct. The --restart always flag ensures the container starts automatically at system startup, and the -v flag mounts the /home/db directory to the container's /var/lib/postgresql directory.
upvoted 0 times
Micah
4 days ago
User 3: Thanks for clarifying. I will use docker run -d --restart always -p 5432:5432 -v /home/db:/var/lib/postgresql postgresql:12 to start the PostgreSQL container.
upvoted 0 times
...
Aaron
17 days ago
User 2: Yes, that's right. Option A is the correct command to achieve the desired task.
upvoted 0 times
...
Dona
19 days ago
User 1: Option A seems correct. The --restart always flag ensures the container starts automatically at system startup, and the -v flag mounts the /home/db directory to the container's /var/lib/postgresql directory.
upvoted 0 times
...
Paulina
19 days ago
User 1: I think option A is the right choice.
upvoted 0 times
...
...
Eugene
2 months ago
Why do you think B is the correct answer?
upvoted 0 times
...
Rozella
2 months ago
I disagree, I believe the correct answer is B.
upvoted 0 times
...
Eugene
2 months ago
I think the answer is A.
upvoted 0 times
...

Save Cancel