Bird
0
0

Which of the following is the correct syntax to initialize a swarm with a specific advertise address?

easy📝 Syntax Q12 of 15
Docker - Swarm
Which of the following is the correct syntax to initialize a swarm with a specific advertise address?
Adocker swarm create --advertise 192.168.1.10
Bdocker swarm start --advertise-addr 192.168.1.10
Cdocker swarm init --advertise-addr 192.168.1.10
Ddocker swarm init -a 192.168.1.10
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct command syntax

    The correct command to initialize swarm with advertise address is docker swarm init --advertise-addr <IP>.
  2. Step 2: Identify incorrect options

    docker swarm start and docker swarm create are invalid commands. The short flag -a is not recognized for advertise address.
  3. Final Answer:

    docker swarm init --advertise-addr 192.168.1.10 -> Option C
  4. Quick Check:

    Use --advertise-addr with init [OK]
Quick Trick: Use full flag --advertise-addr with init [OK]
Common Mistakes:
  • Using 'start' or 'create' instead of 'init'
  • Using short flag '-a' which is invalid
  • Omitting --advertise-addr flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes