Upgrade from 13.12.9 to 14.xx in docker


I used to upgrade 13.x versions following process here : GitLab Docker images | GitLab i.e. deleting and re-creating container with new image.

This does not seem to work for upgrading from 13.12.9 to 14.x (tried 14.0.0 and 14.0.5). In both case, the container migration eventually fails.

Checking the logs, I saw this line

2021-09-27_11:49:10.41336 FATAL:  database files are incompatible with server
2021-09-27_11:49:10.41344 DETAIL:  The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.6.

which seems to indicate that I should convert the database first ? or am I missing something else ?

Best regards