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

Docker DCA Exam - Topic 1 Question 119 Discussion

Posted by Matthew on Nov 23, 2025 at 01:54 PM

Does this command create a swarm service that only listens on port 53 using the UDP protocol?

Solution. 'docker service create -name dns-cache -p 53:53/udp dns-cache"

Suggested Answer: B

= The command 'docker service create -name dns-cache -p 53:53/udp dns-cache' is not correct and will not create a swarm service that only listens on port 53 using the UDP protocol. There are two errors in the command:

The option-nameshould be--namewith two dashes, otherwise it will be interpreted as a short option-nfollowed by an argumentame1.

The option-por--publishwill publish the service port to the host port, which means the service will be reachable from outside the swarm2.To create a service that only listens on the internal network, you need to use the--publish-addoption with themode=ingressflag3.

The correct command should be:

docker service create --name dns-cache --publish-add mode=ingress,target=53,published=53,protocol=udp dns-cache

:

docker service create | Docker Docs

Publish ports on the host | Docker Docs

Publish a port for a service | Docker Docs


Get Premium DCA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
30 comments · newest first
DA
Dacia 6 months ago
I’m leaning towards B) No. It might not work as expected.
HO
Honey 6 months ago
I feel it's A) Yes. The command looks correct.
ER
Ernestine 6 months ago
But what if the service fails? Is it still valid?
AU
Augustine 7 months ago
Definitely A) Yes. Port mapping is clear.
AL
Alva 7 months ago
I agree, but it could be misleading.
JA
Janey 7 months ago
Yup, that's how you set up a DNS service!
CH
Chau 8 months ago
Seems right, but I thought it needed TCP too.
CO
Colette 8 months ago
Wait, is it really only UDP?
LO
Louvenia 8 months ago
Definitely creates a service for DNS.
RO
Rodolfo 8 months ago
Yes, it maps port 53 for UDP.
CA
Carin 8 months ago
Wait, does this mean I can't use my microwave while the DNS service is running? Asking for a friend.
LA
Lamonica 8 months ago
A) Yes, the command creates a swarm service that listens on port 53 using UDP. Easy peasy!
EM
Emelda 9 months ago
B) No, this command doesn't create a swarm service. It creates a container with the name "dns-cache" that listens on port 53 using UDP.
PA
Pa 9 months ago
I believe the command does create a service for port 53, but I need to double-check if it only listens on UDP as stated.
CL
Clemencia 9 months ago
I'm a bit confused about the `-name` flag; I thought it was supposed to be `--name`. Does that affect the command?
GE
Genevive 9 months ago
I remember practicing a similar question, and I think the port mapping looks right for a swarm service.
KI
Kina 9 months ago
The command looks straightforward to me. The -p 53:53/udp part clearly indicates it's listening on UDP port 53, so I'll select A for this one.
ER
Erin 9 months ago
Wait, I'm a little confused. Does the "dns-cache" part mean it's a specific DNS caching service, or is that just the name of the service? I want to make sure I understand the full context before answering.
TR
Trinidad 10 months ago
Okay, I'm pretty confident this command sets up a UDP service on port 53. The -p 53:53/udp part seems to specify that. I'll go with A.
ST
Stefany 10 months ago
I think the command is correct since it specifies the UDP protocol, but I'm not entirely sure about the syntax.
KI
King 10 months ago
Looks good to me! Now I can finally stop using my neighbor's WiFi password.
LA
Layla 10 months ago
I think it's A) Yes. It specifies UDP.
SH
Shelton 10 months ago
Yes, this command creates a swarm service that listens on port 53 using the UDP protocol.
HO
Hollis 11 months ago
Hmm, I'm not totally sure about this one. The command looks right, but I want to double-check the documentation to be certain. I'll have to think it through a bit more.
EL
Elizabeth 11 months ago
I think this command does create a swarm service that listens on port 53 using UDP, so I'll go with A.
LO
Louvenia 5 months ago
↳ replying to Elizabeth
No doubt, it’s set up for UDP on port 53.
DA
Daisy 5 months ago
↳ replying to Elizabeth
I think it’s A as well, good catch!
SH
Shaunna 6 months ago
↳ replying to Elizabeth
I’m leaning towards A too, seems straightforward.
AL
Aleisha 6 months ago
↳ replying to Elizabeth
Yeah, the command looks correct for UDP.
QU
Queenie 6 months ago
↳ replying to Elizabeth
I agree with you, it definitely creates the service on port 53.
0/2000 characters

Save Cancel