当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
- jenkins pipline stage 设置超时
- 2020年新规,微信封号怎么快速解除?
- k-vim安装及The ycmd server SHUT DOWN (restart with ':YcmRestartServer')这种错误的解决方法
- 移动端像素适配方案
- STlink下载出现st-link usb communication error解决方法
- How to optimize the decoding performance of dynamsoft barcode reader
- August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
- The memorandum model of behavior model
- Composition of MRAM cache
猜你喜欢

Do you really know how to use search engines?
![[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform](/img/3b/00bc81122d330c9d59909994e61027.jpg)
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform

gitlab 持续集成开发环境之CI/CD

10000! Ideal car recalls all defective cars: 97 accidents have occurred and losses will be expanded

The Interpreter pattern of behavior pattern

Two dimensional code location and alarm system of Expressway

Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)

南京标识标牌设计制作,导视VI系统设计

如何才能快速正确的部署甘特图

Win7 how to quickly type CMD and get to the required directory
随机推荐
win7如何快速打cmd并到达所要的目录
The method of local search port number occupation in Windows system
南京标识标牌设计制作,导视VI系统设计
How to create an interactive kernel density chart
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
JVM class loading mechanism
New features of vue3
你真的会使用搜索引擎吗?
2020年新规,微信封号怎么快速解除?
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
REM: the solution of PC and mobile
Gantt chart grouping activities tutorial
Bluetooth broadcast chip for Shanghai giant micro
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
Using JSON webtoken (JWT) to generate token in nodejs
Js字符串-String字符串对象方法
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?
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
confd