当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- .NETCore3.1+ Vue.js Low code workflow engine
- 2020-11-06: go, let's talk about the scheduler.
- Count the number of project code lines
- 如何创建交互式内核密度图表
- Win7 AppCrash (solution)
- confd
- 关于DevOps的七大误解,99%的人都曾中过招!
- [graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
- VARCHART XGantt入门教程
- PHP backdoor hiding skills
猜你喜欢

How to create an interactive kernel density chart

The advantages and functions of psychological counseling app

confd

RFID fixed assets management system for fire equipment

pc端与移动端适配解决方案之rem

Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found

关于DevOps的七大误解,99%的人都曾中过招!

How to use Gantt chart layers and filters

How to add modules to nginx image?

嘉宾专访|2020 PostgreSQL亚洲大会中文分论坛:岳彩波
随机推荐
Mongo user rights login instruction
.NETCore3.1+ Vue.js Low code workflow engine
The method of local search port number occupation in Windows system
RECH8.0版本学习 days 12 rh134部分
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
Python3 operating gitlab
如何使用甘特图图层和筛选器
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
Gantt chart grouping activities tutorial
How to deploy Gantt chart quickly and correctly
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
The advantages and functions of psychological counseling app
2020年新规,微信封号怎么快速解除?
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
频收罚单的浦发银行:增收不增利,曾遭骗贷数亿元,内控缺位?
2020-08-17: how to solve data skew in detail?
Plug in bilibilibili new version 0.5.5
idea 激活到 2089 失效
移动端像素适配方案
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud