Mounting a volume as non-root from Windows

While mounting a volume that reside on a Windows host, all the files belong to root, which is unfortunate.

$ docker run --rm -it -v c:/Users/Me:/data ls -l /data
-rwxr-xr-x 1 root root 22299 ...
...

any ideas on a nicer way?

I’m running docker 1.12-rc3-beta18 btw.

The solution could imply this kind of trick. Within the MobyLinux VM, it should mount the host directory as a user rather than as root.

$ mount -t cifs ... /c -o username=...,password=...,uid=1000,gid=100,...

Then from the container point of view, the external files could match a local user rather than the super user.

My main pain point with root:root is that many tools are complaining that the files belongs to root. The docker UI could have a little setting to be able to pick the uid/gid pair.

What do you think? Cheers,

2 Likes

My main pain point with root:root is that many tools are complaining that the files belongs to root.

This is exactly my problem. A configuration in the GUI would be awesome!

1 Like

Any progress on this? @greut’s suggestion to allow us to specify uid/gid would be tremendous, gui or not.

Any progress on this? I agree with @grout

Any progress on this? I agree with @greut’s suggestion to allow us to set the uid/gid, via a ui or no.