Docker Community Forums

Share and learn in the Docker community.

Unable to mount docker volume with Windows 7 64-bit


(Fsunaval) #1

Ok, I finally need help.

How stable are docker volumes with Windows 7 ?

I have the Docker Quickstart Terminal.

$ docker version
Client:
Version: 17.10.0-ce
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:00:02 2017
OS/Arch: windows/amd64

Server:
Version: 18.01.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: 03596f5
Built: Wed Jan 10 20:13:12 2018
OS/Arch: linux/amd64
Experimental: false

Everything works fine except for docker volumes.

What am I missing?

I believe I have correctly shared the folder. See diagram below
imageimage.png794x571 35.1 KB
I now mount the folder to /var/task

$ docker run -it --mount type=bind,source=/c/go/src/sandbox/code,target=/var/task ubuntu /bin/bash

No errors but I don’t see the contents on /c/go/src/sandbox/code inside the container’s /var/task.

root@68fd6c1f3f49:/# cd /var/task
root@68fd6c1f3f49:/var/task# ls
root@68fd6c1f3f49:/var/task# ls
root@68fd6c1f3f49:/var/task# ls
root@68fd6c1f3f49:/var/task# ls
root@68fd6c1f3f49:/var/task#

Running the command with -v has same issues. No difference.

$ docker run -it -v /c/go/src/sandbox/code:/var/task ubuntu /bin/bash
root@cb55903b3764:/# cd /var/task
root@cb55903b3764:/var/task# ls
root@cb55903b3764:/var/task# ls -la
total 4
drwxr-xr-x 2 root root 40 Jan 14 21:27 .
drwxr-xr-x 14 root root 4096 Jan 15 02:55 …

$ docker inspect cb
[
{
“Id”: “cb55903b376463e863976b46b4802350d8c2796deedba06cadae2efea538f8e9”,
“Created”: “2018-01-15T02:55:30.026862706Z”,
“Path”: “/bin/bash”,
“Args”: [],
“State”: {
“Status”: “running”,
“Running”: true,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 10488,
“ExitCode”: 0,
“Error”: “”,
“StartedAt”: “2018-01-15T02:55:30.298677497Z”,
“FinishedAt”: “0001-01-01T00:00:00Z”
},
“Image”: “sha256:00fd29ccc6f167fa991580690a00e844664cb2381c74cd14d539e36ca014f043”,
“ResolvConfPath”: “/mnt/sda1/var/lib/docker/containers/cb55903b376463e863976b46b4802350d8c2796deedba06cadae2efea538f8e9/resolv.conf”,
“HostnamePath”: “/mnt/sda1/var/lib/docker/containers/cb55903b376463e863976b46b4802350d8c2796deedba06cadae2efea538f8e9/hostname”,
“HostsPath”: “/mnt/sda1/var/lib/docker/containers/cb55903b376463e863976b46b4802350d8c2796deedba06cadae2efea538f8e9/hosts”,
“LogPath”: “/mnt/sda1/var/lib/docker/containers/cb55903b376463e863976b46b4802350d8c2796deedba06cadae2efea538f8e9/cb55903b376463e863976b46b4802
350d8c2796deedba06cadae2efea538f8e9-json.log”,
“Name”: “/admiring_ride”,
“RestartCount”: 0,
“Driver”: “aufs”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
"/c/go/src/sandbox/code:/var/task"
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “default”,
“PortBindings”: {},
“RestartPolicy”: {
“Name”: “no”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: null,
“CapAdd”: null,
“CapDrop”: null,
“Dns”: [],
“DnsOptions”: [],
“DnsSearch”: [],
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “shareable”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: false,
“SecurityOpt”: null,
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 67108864,
“Runtime”: “runc”,
“ConsoleSize”: [
80,
150
],
“Isolation”: “”,
“CpuShares”: 0,
“Memory”: 0,
“NanoCpus”: 0,
“CgroupParent”: “”,
“BlkioWeight”: 0,
“BlkioWeightDevice”: [],
“BlkioDeviceReadBps”: null,
“BlkioDeviceWriteBps”: null,
“BlkioDeviceReadIOps”: null,
“BlkioDeviceWriteIOps”: null,
“CpuPeriod”: 0,
“CpuQuota”: 0,
“CpuRealtimePeriod”: 0,
“CpuRealtimeRuntime”: 0,
“CpusetCpus”: “”,
“CpusetMems”: “”,
“Devices”: [],
“DeviceCgroupRules”: null,
“DiskQuota”: 0,
“KernelMemory”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: null,
“OomKillDisable”: false,
“PidsLimit”: 0,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0
},
“GraphDriver”: {
“Data”: null,
“Name”: “aufs”
},
“Mounts”: [
{
“Type”: “bind”,
“Source”: “/c/go/src/sandbox/code”,
“Destination”: “/var/task”,
“Mode”: “”,
“RW”: true,
“Propagation”: “rprivate”
}
],
“Config”: {
“Hostname”: “cb55903b3764”,
“Domainname”: “”,
“User”: “”,
“AttachStdin”: true,
“AttachStdout”: true,
“AttachStderr”: true,
“Tty”: true,
“OpenStdin”: true,
“StdinOnce”: true,
“Env”: [
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”
],
“Cmd”: [
"/bin/bash"
],
“Image”: “ubuntu”,
“Volumes”: null,
“WorkingDir”: “”,
“Entrypoint”: null,
“OnBuild”: null,
“Labels”: {}
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “2bc5564b267ada024e75bcdf806ee0b84b2b0222297e385e9db83a2ceb78874e”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {},
“SandboxKey”: “/var/run/docker/netns/2bc5564b267a”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “32f9f454d00b46f61389481cfa8ce5128b5d0e9e1eef07a860009810717b89da”,
“Gateway”: “172.17.0.1”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “172.17.0.3”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“MacAddress”: “02:42:ac:11:00:03”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “d5e4b4b78126423201eef9a8b17ee742e1c8ff537b169cfd723b0c4410c142d8”,
“EndpointID”: “32f9f454d00b46f61389481cfa8ce5128b5d0e9e1eef07a860009810717b89da”,
“Gateway”: “172.17.0.1”,
“IPAddress”: “172.17.0.3”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “02:42:ac:11:00:03”,
“DriverOpts”: null
}
}
}
}
]

F00904564@F00904564-SC03 MINGW64 ~
$

Any pointers will be highly appreciated.

thanks,
Farhad.


(Fsunaval) #2

Anyone with ideas on this?