当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 你真的会使用搜索引擎吗?
- 图像处理工具包ImagXpress使用教程,如何查看事件
- List to map (split the list according to the key, and the value of the same key is a list)
- confd
- 2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
- September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.
- 小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
- 条形码识别性能低,如何优化Dynamsoft Barcode Reader解码性能
- 10000! Ideal car recalls all defective cars: 97 accidents have occurred and losses will be expanded
- Big data processing black Technology: revealing the parallel computing technology of Pb level data warehouse gaussdb (DWS)
猜你喜欢
REM: the solution of PC and mobile
南京标志设计,logo设计公司
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
Win7 AppCrash (solution)
PHP backdoor hiding skills
.NETCore3.1+ Vue.js Low code workflow engine
A kind of super parameter optimization technology hyperopt
8. Swarm creates maintenance and horizontal extension service
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
移动端像素适配方案
随机推荐
confd
VARCHART XGantt入门教程
南京标识标牌设计制作,导视VI系统设计
Composition of MRAM cache
如何创建交互式内核密度图表
jenkins pipline stage 设置超时
How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
Jenkins installation and deployment process
关于DevOps的七大误解,99%的人都曾中过招!
python3操作Jenkins模块api
Stm32f030c6t6 compatible to replace mm32spin05pf
vue3 新特性
Js字符串-String字符串对象方法
Jenkins pipline stage setting timeout
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
The memorandum model of behavior model
Bluetooth broadcast chip for Shanghai giant micro
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
How to solve the problem of blank page in Google Chrome browser
QT audio and video development 46 video transmission UDP version