sudo docker service create --name myweb --replicas 3 nginx
w07l6dmbyixskrnyrnrlh91e7
overall progress: 3 out of 3 tasks
1/3: running [==================================================>]
2/3: running [==================================================>]
3/3: running [==================================================>]
verify: Service converged
sudo docker service ps myweb
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
qqhm9qjthp17 myweb.1 nginx:latest ip-172-31-8-58 Running Running 4 minutes ago
rk22v61z4q4z myweb.2 nginx:latest ip-172-31-15-10 Running Running 4 minutes ago
vrdpsym9dcvi myweb.3 nginx:latest ip-172-31-0-113 Running Running 4 minutes ago
sudo docker service create --name myservice --mode global alpine top
p0u0okh1zbck9zr2f1h6ku13i
overall progress: 3 out of 3 tasks
kj7q08sfk4oj: running [==================================================>]
o4adqybqntez: running [==================================================>]
64z9yjpcsg3w: running [==================================================>]
verify: Service converged
sudo docker service ps myservice
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
tn8xr9y36ehr myservice.o4adqybqntezkuluy709304os alpine:latest ip-172-31-15-10 Running Running about a minute ago
8l4kqqyb3buq myservice.kj7q08sfk4ojxq9cq9ezejk78 alpine:latest ip-172-31-0-113 Running Running about a minute ago
w7jasucvqq85 myservice.64z9yjpcsg3wu0yivbxfjkasd alpine:latest ip-172-31-8-58 Running Running about a minute ago
sudo docker service ls
ID NAME MODE REPLICAS IMAGE
p0u0okh1zbck myservice global 3/3 alpine:latest
w07l6dmbyixs myweb replicated 3/3 nginx:latest
sudo docker service rm myweb myservice
myweb
myservice
No comments:
Post a Comment