-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netshare cifs and passing UID/GID through docker compose #162
Comments
I am having the same issue with the docker run command: I tried variations on that but could not get it to work. Docker doesn't give me an error but it mounts the drive as root still. I can mount the drive manually using the "-o" option without any problems. |
there is also an option tried it with this both variants:
and --mount 'type=volume,dst=/var/lib/grafana,src=grafana_test,volume-driver=cifs,volume-opt=share=host01/services_data/grafana_data,volume-opt=username=myuser,volume-opt=password=mypw,volume-opt=domain=mydomain,volume-opt=fileMode=0777,volume-opt=dirMode=0777,"volume-opt=cifsopts=uid=472,gid=472,nobrl,forceuid,forcegid"'
|
I think I got it... |
I couldn't get that working. Are you sure you didn't mount it manually first? The mount should go away when you do a stop on the container. That is the advantage of the driver. It can mount when the container runs and remove it after. I can mount it manually like this: The driver supports the -o option and so does the mount command. So am not sure why docker isn't passing this along. Right now I mount it by hand and than load it in as a standard mount. But that means I can't use a scheduling software. |
I never used the o option for driver or docker. |
According to the netshare help page (docker-volume-netshare cifs --help) cifs mount options like uid,gid etc can be passed through the -o flag. However how does one pass this through the compose file?
An extract of my compose file is below which seems to be doing nothing with the uid/gid being passed and instead the drive is mounted as root.
version: '3.2' volumes: appconfig: driver_opts: share: freenas.nkak.uk/nascifs/DockerAppData/app/config o: uid=10001,gid=50012,iocharset=utf8,rw driver: cifs appdata: driver_opts: share: freenas.nkak.uk/nasdata o: uid=0,gid=50011,iocharset=utf8,rw driver: cifs
Any thing to mount a cifs share with a given uid/gid will help.
The text was updated successfully, but these errors were encountered: