@KarlF12 Thanks, that is interesting that it’s in the Docker documentation. I read your comment and was thinking about investigating the entrypoint script, then Reiner_Nippes commented in detail (thanks @Reiner_Nippes), that’s what I was suspecting.
I still wonder what the reason is behind this choice. Not only are we mapping application code in a volume (which shouldn’t be modified and doesn’t need to be backed up), but that also means the new Docker container every time has to check and update the copy of the application code if you upgraded. To me that seems pretty strange, so I would still prefer to map only those specific files/folders that are excluded from the rsync, which obviously are the ones you want to save when the container gets destroyed.
Maybe it’s just easier to explain for new people using the docker image of Nextcloud instead of making you map 5 different volumes, but given a good docker-compose example it shouldn’t be a big deal. I just can’t put my finger on it, but it seems like we could eventually run into issues by mapping /var/www/html entirely.
Good discussion!