- The correct answer is:
$ docker swarm init [--advertise-addr <IP address>]
The --advertise-addr is optional and only needed if you the host have more than one IP address.
- On the worker node that you want to remove execute: $ docker swarm leave
On one of the master nodes execute the command $ docker node rm -f <node ID>
where <node ID> is the ID of the worker node to remove. - The correct answer is:
$ docker network create \
--driver overlay \
--attachable \
front-tier
- The correct answer is:
$ docker service create --name web \
--network front-tier \
--replicas 5 \
-p 3000:80 \
nginx:alpine
- The correct answer is:
$ docker service update --replicas 3 web