docker集群更新image
启动service
docker service create --name web --publish 8090:5000 --network web xiaopeng163/python-flask-demo:1.0
scale等于2
docker service scale web=2
更新image
docker service update --image xiaopeng163/python-flask-demo:2.0 web
更新端口
docker service update --publish-rm 8090:5000 --publish-add 8091:5000 web
更新过程中可以另起一个终端,写个循环查看更新过程
sh -c "while true; do curl 127.0.0.1:8090&&sleep 1; done" sh -c "while true; do curl 127.0.0.1:8091&&sleep 1; done"
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06