Dockerfile and Podman

Hi,
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
volumes:
\ - ./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.

Thanks
Pelle

There are several possibilities, but see https://github.com/containers/podman/blob/main/troubleshooting.md#34-container-creates-a-file-that-is-not-owned-by-the-users-regular-uid (particularly near the end)