Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker upgrade Container Command

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

docker What is the upgrade container command? To achieve docker online upgrade, you can check whether the container is running when the docker daemon starts, and if it is running, clean up the legacy process of the container, and then restart the container. To ensure that it is still managed as the parent process of the container. Of course, this requires adding a new piece of code to docker to implement this functionality.

In addition, the idea of upgrading containers is: upgrade Docker Image; close the existing container and delete it; reopen the new container so that the new code can be used; upgrade the database.

Upgrade Docker Image

Upgrading Image is easy, just pull down the latest data from the server

docker pull quay.io/sameersbn/redmine:latest

Close on container and delete

Go to the working directory/data, use docker-compose to close the level container

cd /datadocker-compose stopdocker rm data_redmine_1

Reopen the new container so that the new code can be used

Due to code upgrade, new configuration of environment parameters has been added.

REDMINE_SECRET_TOKENDB_NAME

One of these two is the log prompt, and the other is that after the discovery service upgrade, the old user cannot log in. Check the reason and know that it is because the default value of the database name has changed. There are other parameters that may be affected and need to be looked at carefully on the details page.

docker-compose start

upgrade the database

docker exec -it data_redmine_1 bashcd $WORKDIRRAILS_ENV=production bundle exec rake db:migrate

As a senior professional cloud computing service provider and cloud security service provider in the industry, it is committed to providing Cloud Virtual Machine for the majority of Internet enterprise users and enterprise users in traditional industries. Its products have the characteristics and advantages of "security and stability, simple and easy to use, high service availability and high cost performance." It is specially customized for enterprises to go to the cloud and can meet the rich and diversified application scenarios of users.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report