当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Cloudquery v1.2.0 release
- How to optimize the decoding performance of dynamsoft barcode reader
- 如何使用甘特图图层和筛选器
- Git SSH bad permissions
- New features of vue3
- The advantages and functions of psychological counseling app
- Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
- Empty test suite appears in JUnit test
- 关于DevOps的七大误解,99%的人都曾中过招!
- In 2020, how can wechat seal numbers be quickly lifted?
猜你喜欢
confd
python3操作Jenkins模块api
LEADTOOLS如何检测,读取和写入条形码
7. Swarm builds clusters
How to add modules to nginx image?
甘特图对活动进行分组教程
The Interpreter pattern of behavior pattern
Composition of MRAM cache
RFID fixed assets management system for fire equipment
How to solve the problem of blank page in Google Chrome browser
随机推荐
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
List to map (split the list according to the key, and the value of the same key is a list)
How to solve the problem of blank page in Google Chrome browser
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
Application of UHF RFID medical blood management system
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
Common mathematical basic formulas of recursive and backtracking algorithms
REM: the solution of PC and mobile
Git SSH bad permissions
.NETCore3.1+Vue.js打造的低代码工作流引擎
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
python3操作Jenkins模块api
2020-11-06: go, let's talk about the scheduler.
gitlab 持续集成开发环境之CI/CD
Js字符串-String字符串对象方法
A kind of super parameter optimization technology hyperopt
Yum [errno 256] no more mirrors to try solution
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
vue3 新特性