Sorry for the insistence… The forum software already complained that I talk too much ._)
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
— I do not fully understand this command, so I could not correct it, but it gives an error:
docker: Error response from daemon: Unable to setup mount point, neither source nor volume defined.
I had already tried another version from Vietnam which partly worked:
docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
And I am in some # bash
(I will try to modify it to your version)
docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
and inside the created shell, you run the 2nd command:
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
and finally inside the shell created in 2), you run:
chroot /host
followed by the mount command mentioned before by Michael.
Thanks, po, I had read and tried your other post on the subject, but in error thought that the second command had to be given NOT inside the created shell. Some progress here: c and C are there. To be sure: ping to 10.0.75.1 works.
docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
/ # docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
/ # ls
bin dev etc home host lib linuxrc media mnt proc root run sbin sys tmp usr var
/ # chroot /host
/ # ls
C Mac c etc init linuxrc port root sbin tmp var
Database bin dev home lib media proc run sys usr
/ # ls c
/ # ls C
/ # mount -t cifs //10.0.75.1/C /C -o username=Dieter,password=mydearpass,noperm
mount error(115): Operation in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
/ #
Oh the dreaded 115 return code. Assuming that the root shares are operational and username=Dieter has access to those shares (pls confirm) here is my suggestion (Michael knows better…):
umount all the shares (/c /C /d /D) cat /proc/fs/cifs/DebugData (post here pls) echo 7 > /proc/fs/cifs/cifsFYI mount -t cifs //10.0.75.1/c /c -o user=Dieter,password=yourpassws,domain=yourhostname cat /proc/fs/cifs/DebugData (post here pls) dmesg (last 20 lines or so…) echo 0 > /proc/fs/cifs/cifsFYI just to undo previous
I tried to follow along as I am having similar problems with mounts in Docker Beta windows. I got a different error after the final mount:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
This was with a new user and a simple alpha-only password, and a restart, unshare, reshare. Trying to browse the c-drive gives me ‘Windows can’t find ‘\10.0.0.75.1\c’. Check the spelling and try again.’
Thanks for you patience. I hope by “unmount all the shares” you mean: Unshare all in Docker settings. If not, please correct me. As an alternative, I tried it within bash when C had been shared:
/ # umount c
umount: c: not mounted
/ # umount C
umount: C: not mounted
Password: the password is my only password on this computer. This is a development computer, I have all rights as administrator. No domain. When I enter the wrong password during sharing in Docker Settings, system complains.
Your requests:
>docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
/ # docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
/ # ls
bin dev etc home host lib linuxrc media mnt proc root run sbin sys tmp usr var
/ # cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.08
Features: dfs fscache posix xattr
Active VFS Requests: 0
Servers:
/ # echo 7 > /proc/fs/cifs/cifsFYI
/ # mount -t cifs //10.0.75.1/c /c -o user=Dieter,password=mydearpassword,domain=yourhostname
mount: mounting //10.0.75.1/c on /c failed: No such file or directory
/ # cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.08
Features: dfs fscache posix xattr
Active VFS Requests: 0
Servers:
/ # dmesg
...
...
hv_balloon: Data Size is 8
random: nonblocking pool is initialized
nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
aufs au_opts_verify:1597:docker[1339]: dirperm1 breaks the protection by the permission bits on the lower branch
device veth33f503a entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): veth33f503a: link is not ready
docker0: port 1(veth33f503a) entered forwarding state
docker0: port 1(veth33f503a) entered forwarding state
docker0: port 1(veth33f503a) entered disabled state
IPVS: Creating netns size=1328 id=3
cgroup: docker-runc (3320) created nested cgroup for controller "memory" which has incomplete hierarchy support. Nested cgroups may change behavior in the future.
cgroup: "memory" requires setting use_hierarchy to 1 on the root
eth0: renamed from veth75807f3
IPv6: ADDRCONF(NETDEV_CHANGE): veth33f503a: link becomes ready
docker0: port 1(veth33f503a) entered forwarding state
docker0: port 1(veth33f503a) entered forwarding state
IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready
docker0: port 1(veth33f503a) entered forwarding state
/ #
Dieter, tough nut to crack. It looks like the sharing is not setup under windows. The culprit show up in: mounting //10.0.75.1/c on /c failed: No such file or directory
ensure shares are available. On a Windows command prompt
C:\Users\po755>net share
Share name Resource Remark
C C:\ Caching disabled
D D:\ Caching disabled
E E:\ Caching disabled
The command completed successfully.
ensure you have access to those shares under your Dieter userid. That is net use \\<computername>\C
must work under your userid. And use the computername instead of domain name in the cifs mount command.
>net share
Name Ressource Beschreibung
-------------------------------------------------------------------------------
....
C C:\ Zwischenspeicherung deaktiviert (Caching disabled)
D D:\ Zwischenspeicherung deaktiviert
E E:\ Zwischenspeicherung deaktiviert
...
Der Befehl wurde erfolgreich ausgeführt. (successfully)
... Name of computer is DieterPC ...
>net use \\DieterPC\C
Der Befehl wurde erfolgreich ausgeführt. (success)
Wow, closer to target thanks to your help. Not that I understand why this works. After all, my computer knows what 10.0.75.1 is.
/ # mount -t cifs //DieterPC/C /C -o username=Dieter,password=mypassword,noperm
/ # ls
C Database Mac bin c dev etc home init lib linuxrc media port proc root run sbin sys tmp usr
var
/ # ls C
$Recycle.Bin Documents and Settings Program Files (x86) Recovery Windows inetpub
BOOTNXT Dokumente und Einstellungen ProgramData Rtools autoexec.bat pagefile.sys
BOOTSECT.BAK IO.SYS
Glad to hear that’s working now… your turn to let us know what did you do to make it to work… One thing I noticed: you’re mounting the share using the computer name instead of the IP address…
Mounting the share using the computer name instead of the IP address: I read this from your comment: “And use the computername instead of domain name in the cifs mount command”. The blame goes to you
However, I do not think that this is a solution, just a way of getting it to work in my setting. After all, this should work without four rather nasty lines on the command prompt (five, one more for c/C). I hope that it will help the developers to get this done automatically. I use docker to supply ready-to-use installation of R and Shiny to my colleagues at the hospitals, and even one line in the black box will lead to immediate “not for us” reactions.
docker run --privileged -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker alpine sh
# inside the created shell, you run the 2nd command:
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
mount -t cifs //<computername>/C /C -o username=Dieter,password=yourpassword,noperm
Note: computername is the Network name of the computer.
I tried the solution from @elucas and it works for me.
1/ to be sure, change your windows password with something simple with no special chars
2/ reset your shared drive credentiel, and don’t mount C:
3/ when you are prompt for login / password use : 10.0.75.1\yourusername (or 10.0.75.1\yourusername@something.com if necessary)
and your password
4/ try with the docker example : docker run --rm -v ./folderwithfiles:/data alpine ls /data
Yes. For me, there is a bug if I mount the C drive. If I check C: and E:, I can’t mount volumes. But if I reset credentials, and only mount E:, it works.
I was having the same problems with volume mounts yersterday. I could resolve it with following steps:
Created a new account ‘dockeruser’ with [0-9a-zA-Z]+ password.
Shared drive with shared drives screen of the traybar application.
Entered 10.0.75.2\dockeruser as username and dockeruser’s password
Removed sharing of the drive in windows explorer.
Reshared the drive with docker
Now working
It seems like the ResetCredentials option is not working properly. Basically it should do the required steps including removing the shared driver status for the connected docker users. However, this is not the case. Only manually removing the shared option on the volume allowed it to be shared correctly afterwards. I’m not sure about the account though, it might also work with your user account.