Backup your database.
Run a second docker container with new version database.
Restore/import backed up database from old version into the new version.
And then try out if all works without errors.
If errors, you can just revert back to your initial docker container with the old version.
You could:
Backup your database. Run a second docker container with new version database. Restore/import backed up database from old version into the new version.
And then try out if all works without errors.
If errors, you can just revert back to your initial docker container with the old version.