January 2018
Intermediate to advanced
414 pages
10h 29m
English
Let's first look at which services we have to run with the following command:
docker service ls
This should show us our service instances:
ID NAME MODE REPLICAS IMAGE PORTSsyqgugo598xn hello-service replicated 1/1 localhost:5000/hello:latest *:8080->8080/tcpos5j0iw1p4q1 registry replicated 1/1 registry:latest *:5000->5000/tcp
Here, we see that we have 1 replica for hello-service. Let's increase it with the following command:
docker service scale hello-service=3
After a few seconds, we can list our instances again:
docker service ls
This should now show:
ID NAME MODE REPLICAS IMAGE PORTSsyqgugo598xn hello-service replicated 3/3 localhost:5000/hello:latest *:8080->8080/tcpos5j0iw1p4q1 registry replicated 1/1 registry:latest ...
Read now
Unlock full access