当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 7.Swarm搭建集群
- Shanghai Pudong Development Bank, which frequently receives penalty tickets, has been cheated by hundreds of millions of yuan in loans, and lacks of internal control?
- Git SSH bad permissions
- Dynamsoft barcode reader v7.5!
- 2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
- 测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
- Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
- Cloudquery v1.2.0 release
- pc端与移动端适配解决方案之rem
- 心理咨询app开发所具备的优点与功能
猜你喜欢

Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom

ImageMagick - 添加水印

cubemx做stm32 USB开发

In 2020, how can wechat seal numbers be quickly lifted?

How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?

VARCHART XGantt如何在日历上表示工作日

confd

Insomnia all night

图像处理工具包ImagXpress使用教程,如何查看事件

The method of local search port number occupation in Windows system
随机推荐
Es create a new index database and copy the old index library, practice pro test effective!
August 14, 2020: what are the execution engines for data tasks?
Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
LEADTOOLS如何检测,读取和写入条形码
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
2020-08-15: under what circumstances should data tasks be optimized?
jenkins pipline stage 设置超时
如何才能快速正确的部署甘特图
Gantt chart grouping activities tutorial
Jenkins installation and deployment process
2020-08-17: how to solve data skew in detail?
In 2020, how can wechat seal numbers be quickly lifted?
List to map (split the list according to the key, and the value of the same key is a list)
Shanghai Pudong Development Bank, which frequently receives penalty tickets, has been cheated by hundreds of millions of yuan in loans, and lacks of internal control?
Mongo user rights login instruction
Using JSON webtoken (JWT) to generate token in nodejs
A kind of super parameter optimization technology hyperopt
The advantages and functions of psychological counseling app
11.Service更新
如何创建交互式内核密度图表