李明
|
创建service
sudo docker network create -d overlay demo
docker service create --name web -p 8080:5000 --network demo xiaopeng163/python-flask-demo:1.0 docker service ls docker service ps web
docker service scale web=2 docker service ls docker service ps web
sh -c "while true;do curl 127.0.0.1:8080&&sleep 1;done"
docker service update --image xiaopeng163/python-flask-demo:2.0 web #1.0已经shutdown了,启动了2.0 docker service ps web
docker service update --publish-rm 8080:5000 --publish-add 8088:5000 web docker service ps web docker service web
PS:stack 更新 就不给大家演示了,其实跟这个类似的操作命令大同小异。
|
2018-10-06 21:25:08