Some Docker images are somewhat unique in that you don’t update containers by simply updating the image.
More precisely, I should say that you still update the containers just like you update any Docker image, but these images won’t update their application binaries if they’re already installed. Technically, this is simply because the applications are stored in a bind mount outside of the container, but more accurately, there’s a reason this is done. You tend to see this in containers that rely on databases (Nextcloud, Plex Media Server, etc.) since the data in a database is intrinsically tied to that version of the database. When you update the database code, you usually can’t simply leave the stored database itself alone in a vacuum and update the code alone. You have to update the database binaries and then run a migration so that the database works with the new version. Django developers are likely familiar with this.
To save myself some time in the future, I am outlining the procedure for updating the Linuxserver Nextcloud instance:
From the host, run the following command:
docker exec -it nextcloud updater.phar
You’ll be given a list of “Steps that will be executed” followed by a prompt to “Continue update?”, answer “y”.
The update steps will run, followed (hopefully) by “Update of code successful”. You’ll then be prompted with, “Should the “occ upgrade” command be executed? [Y/n]”, respond to the prompt with “Y” to continue the update.
The upgrade will continue on and upon completion, you’ll receive a final prompt, “Keep maintenance mode active? [y/N]”. Answer “N” to disable maintenance mode and bring your Nextcloud deployment back up for use.
Don’t even bother with the GUI update from Nextcloud itself. It almost always fails and you’ll have to do the above steps to fix it anyway.