Home > Article > Operation and Maintenance > How to upgrade docker containers
Solution:
1. Upgrade Image
Just pull the latest data from the server.
docker pull quay.io/sameersbn/redmine:latest
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
3. Restart the new container
Due to the code upgrade, some new environment parameter configurations have been added
REDMINE_SECRET_TOKEN DB_NAME
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
4. Upgrade the database
docker exec -it data_redmine_1 bash cd $WORKDIR RAILS_ENV=production bundle exec rake db:migrate
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!