How to upgrade docker containers

王林
Release: 2020-04-14 14:27:17
Original
8042 people have browsed it

How to upgrade docker containers

Solution:

1. Upgrade Image

Just pull the latest data from the server.

docker pull quay.io/sameersbn/redmine:latest
Copy after login

2. Close the old container and delete

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

cd /data
docker-compose stop
docker rm data_redmine_1
Copy after login

3. Restart the new container

Due to the code upgrade, some new environment parameter configurations have been added

REDMINE_SECRET_TOKEN
DB_NAME
Copy after login

One of these two was prompted by the log, and the other found that after the service upgrade, the old user could not log in. I checked the reason. I found out that it was because the default value of the database name had changed. There are many other parameters that may be affected, so you need to take a closer look at the details page.

docker-compose start
Copy after login

4. Upgrade the database

docker exec -it data_redmine_1 bash
cd $WORKDIR
RAILS_ENV=production bundle exec rake db:migrate
Copy after login

Recommended tutorial: docker tutorial

The above is the detailed content of How to upgrade docker containers. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!