Open MikkelBC opened 8 years ago
I had to run this:
docker-volume-netshare cifs --username myusername --password "mypasswd" --domain DOMAIN --security ntlm
Then I used this to test: (phusion baseimage is just an example of an image you could run.)
docker run -it --volume-driver=cifs -v servername/sharename:/mount phusion/baseimage /bin/bash
I had to use security ntlm for it to work with my server.
Hi BarnumD,
Thank you for your reply! Have you also successfully used uid
and gid
options? This is the part I am having the most difficulty with.
I have not tried that, sorry.
Thanks anyway for quick feedback!
Looking at the code in cifs.go it seems like you should be able to pass cifsopts
That's what I thought too at one point, but I think cifsopts
are treated differently than the other options. I am not that seasoned in go, so I admit having some difficulty following the flow. When I find some time, I will set up an environment that lets me step through it in the debugger.
There's a Serverfault question asking the same. I too would like to know. And details in general about how to use cifsopts would be great, as we have some other extra stuff in there.
@mfowlewebs , that is my question on Serverfault. I asked it there first but got reprimanded by one of the moderators (Michael Hampton) for asking the question there before asking the developers here.
According to docker-volume-netshare cifs --help you can just pass options using -o just as you would with mount.
ex: -o uid=1000,gid=1000
I am trying to create CIFS docker volumes using docker-volume-netshare. I am having trouble finding the right syntax to pass options to
mount
and I suspect that there might be a bug in the option passing.The sequence should be like this:
and I can get it to work part of the way but for the life of me I can't get it to pass all the options I need.
Instead of trying to recount my countless different failure modes, I would prefer to state my goal. Underneath, docker-volume-netshare will execute a
mount -t cifs ...
command. This can be seen in the log whenverbose
is set totrue
.This is the mount command that I am trying to get. I can get username and password in there, but only when using a .netrc file, and I have found no way to get the uid and gid into the command.
So what I am looking for is the authoritative syntax for passing these options through docker-volume-netshare.