Nextcloud tries to update every time

I have migrated an old Nextcloud 16 instance from a nginx server to a docker and Traefik installation recently. Everything went well, I restored the database and used the nextcloud:16-apache image. Afterwards I switched to the nextcloud:17-apache image and the update went well too.
Everything looks to be working so far, but I noticed that when I docker-compose down and then up again the Nextcloud instance shows the update dialog again every time. The upgrade runs very fast and everything works afterwards, but I am still wondering why this is happening.

I have volumes to persist all my data for nextcloud

volumes:
      - ${DATADIR}/nextcloud/custom_apps:/var/www/html/custom_apps
      - ${DATADIR}/nextcloud/config:/var/www/html/config
      - ${DATADIR}/nextcloud/data:/var/www/html/data
      - ${DATADIR}/nextcloud/themes:/var/www/html/themes

and the database (mariadb:10.3)

volumes:
      - ${DATADIR}/nextcloud_db:/var/lib/mysql

Am I missing something here? My config.php has

'version' => '17.0.6.2',
'datadirectory' => '/var/www/html/data',
'installed' => true,

and of course a lot of other settings.

You can try setting the “Update Channel” to “production”. This can be done using the OCC CLI or from Settings as an Admin.
php occ config:system:set --value production updater.release.channel

This will lock it to only do updates to minor versions at least. Seems to disable the autoupdate screen too. At least it did for me on version 14.

This can also be set in the config.php:
'updater.release.channel' => 'production',

Thank you, but that did not really help. I seem to have stumbled over the solution by accident though: while trying to get CRON working I also added a volume for /var/www/html and that seems to fix it.
Strange… I though beside the folder I already sync the rest are just static files