How to Update GLPI in Docker Between Versions

Step-by-step guide for upgrading GLPI running in Docker from one minor or major version to another, with backup, testing and rollback.

Updating GLPI in Docker is safer and faster than on bare metal – just change the image tag and run the migration. But a pre-update backup is non-negotiable.

Prerequisites

  • Full backup of the database and volumes (see backup guide)
  • Check plugin compatibility with the new version
  • Test in a staging environment first

Step by step

1. Backup

docker exec glpi-db mysqldump -u glpi -pSENHA glpi | gzip > /backup/pre-update.sql.gz
tar -czf /backup/pre-update-volumes.tar.gz /opt/glpi/

2. Stop containers

docker compose down

3. Update the image

In docker-compose.yml, change the tag:

# From:
image: glpi/glpi:10.0.17
# To:
image: glpi/glpi:11.0

4. Start with the new version

docker compose up -d

5. Run the database migration

docker exec -it glpi-app php bin/console db:update --no-interaction

6. Clear cache

docker exec -it glpi-app php bin/console cache:clear

7. Verify

Access GLPI, check the version in Configuration > General and test the main features.

Rollback

If something goes wrong:

docker compose down
# Restore database
gunzip < /backup/pre-update.sql.gz | docker exec -i glpi-db mysql -u root -pSENHA glpi
# Revert to previous image in docker-compose.yml
docker compose up -d

Frequently Asked Questions

Change the image tag in docker-compose.yml, take a backup, recreate the container and run db:update via console. The database is migrated automatically.

Yes, briefly. Stop the containers, take a backup, start with the new image and run the database migration. The typical downtime is 5-15 minutes.

Restore the database backup and revert to the previous image in docker-compose.yml. That is why the pre-update backup is mandatory.

Need help?