Dockerfile and Podman

I’m trying to make a docker image and run it with podman-compose. I did manage to do it with version 26.0.5 but now I cannot manage to do it with ver 26.0.8.
My problem is this:
is that I want to set the data folder to /nextcloud/data. Therefore I creates the /nextcloud/data and set the owner to www-data:www-data in the Dockerfile. That is fine BUT if I mount it in podman-compose.yml like
\ - ./nc/data:/nextcloud/data:Z

the owner of /nextcloud/data will be set to root.
If I run without the volumes line (- ./nc/data:/nextcloud/data:Z) the owner will be www-data. But that is not good enough.
What can be wrong?
I did make it to work earlier.


There are several possibilities, but see (particularly near the end)