Docker Community Forums

Share and learn in the Docker community.

Set user and group in new fuse file sharing

Hi,

I want to share some files between a container and the windows host system. My goto solution was to spin up a samba container and share a volume with the host operating system. Unfortunately, the DockerNAT vSwitch has been deprecated and this does not work anymore.

So, I read that there is a new FUSE based sharing mechanism (Link), which works pretty well. However I need to set the ownership (uid, gid) to something different than root:root. Is there some option/mechanism to tell the FUSE to mask root:root with some different uid:gid?

Thanks

PS: Some minimal example: I want to set the uid:gid to e.g. 1000:1000

docker run -it --rm --mount type=bind,source=T:\temp,target=/workdir --workdir=/workdir busybox ls -sla /workdir
total 4
     0 drwxrwxrwx    1 root     root             0 Apr 21 08:21 .
     4 drwxr-xr-x    1 root     root          4096 Apr 21 08:21 ..
     0 -rwxr-xr-x    1 root     root             0 Apr 21 08:21 file.txt
     0 drwxrwxrwx    1 root     root             0 Apr 21 08:18 folder