August 2017
Intermediate to advanced
332 pages
9h 16m
English
When the service is running, we can scale it up or down so that it will be running in many replicas:
$ docker service scale tomcat=5tomcat scaled to 5
We can check that the service has been scaled:
$ docker service ps tomcatID NAME IMAGE NODE DESIRED STATE CURRENT STATE kjy1udwcnwmi tomcat.1 tomcat:latest ubuntu-manager Running Running 2 minutes ago 536p5zc3kaxz tomcat.2 tomcat:latest ubuntu-worker2 Running Preparing 18 seconds ago npt6ui1g9bdp tomcat.3 tomcat:latest ubuntu-manager Running Running 18 seconds ago zo2kger1rmqc tomcat.4 tomcat:latest ubuntu-worker1 Running Preparing 18 seconds ago 1fb24nf94488 tomcat.5 tomcat:latest ubuntu-worker2 Running Preparing 18 seconds ago
Note that this time, two containers are running ...
Read now
Unlock full access