当前位置:网站首页>11. Service update
11. Service update
2020-11-07 16:43:00 【Taizhu-yj】
establish overlay gateway
docker create network --name demo overlay
establish Service
docker service create --name web --publish 8080:5000 --network demo taizhuyj/python-flask-demo:1.0
Write a script , Polling service
sh -c "while true; do curl 127.0.0.1:8080&&sleep 1; done"
Request once per second service service , Return results :
hello docker, version 1.0
to update Service, I hope the business will not be interrupted in the process
1. For those that need to be updated Service Make one scale, Expand horizontally first , Otherwise, the update service will stop .
docker service scale web=2
2. Yes Service updated image
docker service update --help View update commands
docker service update --image xiaopeng163/python-flask-demo:2.0 web
3. View the polling results , With the new version updated , The result of the request is made by
hello docker, version 1.0
Become simultaneous
hello docker, version 1.0
hello docker, version 2.0
With scale All updates , It's going to be all
hello docker, version 2.0
hello docker, version 2.0
see Service Information
docker service ps web
There will be more than one web Information , among version1.0 already shutdown 了 , And the new update version2.0 is Running, Indicates that the update was successful .
Update port
docker service update --publish-rm 8080:5000 --publish-add 8080:5000 web
Update of network port , Can't do without interruption of service
版权声明
本文为[Taizhu-yj]所创,转载请带上原文链接,感谢
边栏推荐
- vue3 新特性
- How to solve the problem of blank page in Google Chrome browser
- A kind of super parameter optimization technology hyperopt
- Idea activation to 2089 failure
- yum [Errno 256] No more mirrors to try 解决方法
- Experiment one
- 应用层软件开发教父教你如何重构,资深程序员必备专业技能
- Bluetooth broadcast chip for Shanghai giant micro
- September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.
- FreeSWITCH视频会议“标准”解决方案
猜你喜欢
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
Mongo user rights login instruction
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
Python3 operating gitlab
Characteristics of magnetic memory chip STT-MRAM
Application layer software development Godfather teaches you how to refactor, senior programmers must professional skills
Dynamsoft barcode reader v7.5!
三步轻松理解Kerberos协议
2020-08-17: how to solve data skew in detail?
RECH8.0版本学习 days 12 rh134部分
随机推荐
Js字符串-String字符串对象方法
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
New features of vue3
vue3 新特性
如何解决谷歌Chrome浏览器空白页的问题
The use of Xunwei imx6 development board device tree kernel menuconfig
Gantt chart grouping activities tutorial
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
Git remote library rollback specified version
In 2020, how can wechat seal numbers be quickly lifted?
The Interpreter pattern of behavior pattern
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
7.Swarm搭建集群
Count the number of project code lines
9.集群之间服务通信 RoutingMesh
使用RabbitMQ实现分布式事务
Configuration of AP hotspot on xunwei-imx6ull development board
三步轻松理解Kerberos协议
Idea activation to 2089 failure
A kind of super parameter optimization technology hyperopt