当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Jenkins installation and deployment process
- win7 APPCRASH(解决方法)(转)
- PHP backdoor hiding skills
- 插件Bilibili新版0.5.5
- ImageMagick - 添加水印
- 频收罚单的浦发银行:增收不增利,曾遭骗贷数亿元,内控缺位?
- 嘉宾专访|2020 PostgreSQL亚洲大会中文分论坛:岳彩波
- Git SSH bad permissions
- Detailed software engineering -- the necessary graphs in each stage
- August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
猜你喜欢
QT audio and video development 46 video transmission UDP version
Stm32f030c6t6 compatible to replace mm32spin05pf
如何创建交互式内核密度图表
August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
如何解决谷歌Chrome浏览器空白页的问题
How to create an interactive kernel density chart
南京标识标牌设计制作,导视VI系统设计
Image processing toolkit imagexpresshow to view events
2020-08-15: under what circumstances should data tasks be optimized?
Test the necessary skill points of siege lion! This article takes you to interpret the testing technology under Devops
随机推荐
如何使用甘特图图层和筛选器
The use of Xunwei imx6 development board device tree kernel menuconfig
The method of local search port number occupation in Windows system
Mobile pixel adaptation scheme
STlink下载出现st-link usb communication error解决方法
失眠一个整晚上
Points to be considered when deleting mapping field of index in ES
August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
8.Swarm创建维护和水平扩展Service
Git SSH bad permissions
Plug in bilibilibili new version 0.5.5
The Interpreter pattern of behavior pattern
New features of vue3
How to add modules to nginx image?
How does varhart xgantt represent working days on a calendar
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
Yum [errno 256] no more mirrors to try solution
Two dimensional code location and alarm system of Expressway
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer