0
0
Dockerdevops~10 mins

Swarm mode initialization in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to initialize Docker Swarm mode on the current machine.

Docker
docker swarm [1]
Drag options to blanks, or click blank then click option'
Alaunch
Bstart
Ccreate
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'init' which is not a valid swarm command.
Using 'create' or 'launch' which are not Docker swarm commands.
2fill in blank
medium

Complete the command to specify the advertise address when initializing Docker Swarm.

Docker
docker swarm init --advertise-addr [1]
Drag options to blanks, or click blank then click option'
Alocalhost
B192.168.1.100
C0.0.0.0
D255.255.255.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'localhost' which is not reachable by other nodes.
Using '0.0.0.0' which is a wildcard and invalid here.
Using a subnet mask like '255.255.255.0' instead of an IP address.
3fill in blank
hard

Fix the error in the command to initialize Docker Swarm with a specific listen address.

Docker
docker swarm init --listen-addr [1]
Drag options to blanks, or click blank then click option'
A192.168.1.100:2377
Blocalhost:2377
C192.168.1.100
D0.0.0.0
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the port number after the IP address.
Using 'localhost' which is not reachable by other nodes.
Using '0.0.0.0' which is invalid here.
4fill in blank
hard

Fill both blanks to create a command that initializes Docker Swarm with a specific advertise and listen address.

Docker
docker swarm init --advertise-addr [1] --listen-addr [2]
Drag options to blanks, or click blank then click option'
A192.168.1.101
B192.168.1.102:2377
C192.168.1.101:2377
Dlocalhost
Attempts:
3 left
💡 Hint
Common Mistakes
Using IP with port for advertise address.
Using IP without port for listen address.
Using 'localhost' which is not valid for these options.
5fill in blank
hard

Fill all three blanks to create a command that initializes Docker Swarm with a specific advertise address, listen address, and a custom data path.

Docker
docker swarm init --advertise-addr [1] --listen-addr [2] --data-path-port [3]
Drag options to blanks, or click blank then click option'
A192.168.1.110
B192.168.1.110:2377
C4789
D2377
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing listen port with data path port.
Using IP with port for advertise address.
Using invalid port numbers.