当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Js字符串-String字符串对象方法
- Unexpected element.. required element
- A kind of super parameter optimization technology hyperopt
- .NETCore3.1+ Vue.js Low code workflow engine
- How does LeadTools detect, read and write barcodes
- JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
- The method of local search port number occupation in Windows system
- Three steps to understand Kerberos Protocol easily
- Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
- Stm32f030k6t6 compatible replacement smart mm32f031k6t6
猜你喜欢

September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.

Python3 operating gitlab

Common mathematical basic formulas of recursive and backtracking algorithms

2020-09-04: do you understand the function call convention?

条形码识别性能低,如何优化Dynamsoft Barcode Reader解码性能

JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)

How to create an interactive kernel density chart

Two dimensional code location and alarm system of Expressway

The advantages and functions of psychological counseling app

idea 激活到 2089 失效
随机推荐
如何解决谷歌Chrome浏览器空白页的问题
嘉宾介绍|2020 PostgreSQL亚洲大会中文分论坛:潘娟
PHP后门隐藏技巧
一种超参数优化技术-Hyperopt
Python3 operating gitlab
Mobile pixel adaptation scheme
win7 APPCRASH(解决方法)(转)
嘉宾专访|2020 PostgreSQL亚洲大会中文分论坛:岳彩波
2020年新规,微信封号怎么快速解除?
Es create a new index database and copy the old index library, practice pro test effective!
Bluetooth broadcast chip for Shanghai giant micro
August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
The use of Xunwei imx6 development board device tree kernel menuconfig
垃圾分类知识竞赛
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
Two dimensional code location and alarm system of Expressway
pc端与移动端适配解决方案之rem
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题