In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to update the containers in docker, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
If you start/stop many times after creating a container and find that you want to change the parameters, the docker update command can dynamically update the configuration of one or more containers.
The mount directory cannot be modified dynamically. The normal practice is to map the persistent data out, then delete the original container and run a docker container again. The data will not be lost. The logic of orchestration tools such as k8s/mesos is the same and does not modify the container itself.
If you have to, stop the docker service, then modify the container configuration files in the docker home directory, such as / var/lib/docker/container/ container id/config.v2.json and hostconfig.json, and then start docker and container. Because the operation involves suspending the service, it is better to run a new container.
Create a web service
Docker service create-- name web-p 8080Rom 5000-- network demo fan_flask:1.0
Web service scale-out 2 sets
Docker service scale web=2
Update web service
Docker service update-image fan_flask:2.0 web
During the update process, the service will not be interrupted, one of them will be updated first, and then the other will be updated.
Update web service port 8080 to 8088
Docker service update-- publish-rm 8080 web 5000-- publish-add 8088 web
With regard to the docker container update image release, docker commit submits the update and generates a new image.
About how to update the containers in docker to share here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.