docker service create --mode global --name myweb1 -p 8005:80 httpd
docker service rm myweb1
docker service create --replicas 1 --name myweb1 -p 8000:80 httpd
docker service rm myweb1
docker network create --driver overlay mynet
docker service create --replicas 1 --network mynet --name web1 -p 8000:80 httpd
docker service create --replicas 3 --network mynet --name web2 -p 8001:80 httpd
docker service create --mode global --network mynet --name web3 -p 8002:80 httpd
docker service rm web1
docker service create --name web4 --replicas 3 -p 8004:80 httpd:2.4.43
docker service update --image httpd:2.4.46 web4
docker service rm web4
docker service create --name web4 --replicas 3 -p 8004:80 httpd:2.4.43
docker service update --image httpd:2.4.46 web4
docker service rm web2
docker service rm web3
docker service create --name web4 --replicas 6 -p 8004:80 httpd:2.4.43
docker service update --image httpd:2.4.46 --update-parallelism 2 --update-delay 10s web4
docker service rm web4
docker service create --name web4 --replicas 6 -p 8004:80 httpd:2.4.43
Rollback
docker service update --rollback web4
docker service rm web4
docker node update --label-add env=test vm2
docker node update --label-add env=test vm3
docker node inspect vm2
docker service create --constraint node.labels.env==test --replicas 2 --name web1 -p 8000:80 httpd
docker service update --constraint-add node.labels.env==prod web1
docker service rm web1
docker node update --label-rm env vm2
docker node update --label-rm env vm3
docker service create --constraint node.labels.env==test --replicas 2 --name web1 -p 8000:80 httpd
docker service update --constraint-rm node.labels.env==test web1