ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 143 - DCA discussion

Report
Export

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'

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= The commanddocker service create -name dns-cache -p 53:53 -udp dns-cachewill not create a swarm service that only listens on port 53 using the UDP protocol. The reason is that the command has several syntax errors and invalid options.The correct command to create a swarm service that only listens on port 53 using the UDP protocol isdocker service create --name dns-cache --publish published=53,target=53,protocol=udp dns-cache12. The commanddocker service create -name dns-cache -p 53:53 -udp dns-cachehas the following problems:

The option-nameis not a valid option fordocker service create.The valid option for specifying the service name is--name3.

The option-pis not a valid option fordocker service create.The valid option for publishing a port for a service is--publish1.

The option-udpis not a valid option fordocker service create.The valid option for specifying the protocol for a published port isprotocolwithin the--publishoption1.

The argument53:53is not a valid argument fordocker service create.The argument fordocker service createshould be the image name for the service, such asdns-cache3.The source and target of the published port should be specified in the--publishoption, separated by a comma1.

Therefore, the commanddocker service create -name dns-cache -p 53:53 -udp dns-cachewill not work as intended, and will likely produce an error message or an unexpected result.Reference:

Use swarm mode routing mesh

Manage swarm service networks

docker service create

asked 08/11/2024
Randhir Singh
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first