# Dockerfile and Podman

**URL:** <https://help.nextcloud.com/t/dockerfile-and-podman/174014>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** docker, podman\
**Created:** [November 10, 2023, 7:09pm UTC](https://help.nextcloud.com/t/dockerfile-and-podman/174014 "2023-11-10T19:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PelleH](https://help.nextcloud.com/letter_avatar/pelleh/32/6_449c533f586939b6e5f246632a46421f.png) [@PelleH](https://help.nextcloud.com/u/PelleH)\
**Post date:** [November 10, 2023, 7:09pm UTC](https://help.nextcloud.com/t/dockerfile-and-podman/174014/1 "2023-11-10T19:09:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_449c533f586939b6e5f246632a46421f.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [November 14, 2023, 3:21pm UTC](https://help.nextcloud.com/t/dockerfile-and-podman/174014/2 "2023-11-14T15:21:14Z")

</div>

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](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)

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 1:17pm UTC](https://help.nextcloud.com/t/dockerfile-and-podman/174014/3 "2024-12-14T13:17:31Z")

</div>


