I have a docker container named some-mysql, attacched to an overlay network named mynet: when i do docker inspect some-mysql it shows me this huge JSON:
{
"Id": "49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f",
"Created": "2017-02-24T09:21:50.237425126Z",
"Path": "docker-entrypoint.sh",
"Args": [
"mysqld"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 28706,
"ExitCode": 0,
"Error": "",
"StartedAt": "2017-03-27T06:59:40.137554407Z",
"FinishedAt": "2017-03-25T00:05:46.938307695Z"
},
"Image": "sha256:7666f75adb6b50676a366c6fd7a3916cb41f6e8eaf336c3d3ab7d35317fed0b9",
"ResolvConfPath": "/var/lib/docker/containers/49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f/hostname",
"HostsPath": "/var/lib/docker/containers/49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f/hosts",
"LogPath": "/var/lib/docker/containers/49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f/49cb39a4e8e5e7421a4ae69ffd5bb17a8f90f02abbfc3f64ef80d206ceb11c1f-json.log",
"Name": "/some-mysql",
"RestartCount": 0,
"Driver": "aufs",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"3306/tcp": [
{
"HostIp": "",
"HostPort": "3307"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Name": "aufs",
"Data": null
},
"Mounts": [
{
"Type": "volume",
"Name": "c709191cb719b447772bde814f490eb2b30429c9ca7f1c62fda445af9e0b5fb9",
"Source": "/var/lib/docker/volumes/c709191cb719b447772bde814f490eb2b30429c9ca7f1c62fda445af9e0b5fb9/_data",
"Destination": "/var/lib/mysql",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "49cb39a4e8e5",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"MYSQL_ROOT_PASSWORD=pass",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"MYSQL_MAJOR=5.7",
"MYSQL_VERSION=5.7.17-1debian8"
],
"Cmd": [
"mysqld"
],
"ArgsEscaped": true,
"Image": "mysql",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "1f5cde48c303e649f0b675ac11f302336936c7ea0f7c1a0ea8054866c308189d",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"3306/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "3307"
}
]
},
"SandboxKey": "/var/run/docker/netns/1f5cde48c303",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "2800343c29643796d28e8f58a13a7dbf5d1a2706d26f25e27ea623a4673d4439",
"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": "a3ec63c75685ca69af892f7047abc2c1d0955407d61423f2cff87500eedaadf3",
"EndpointID": "2800343c29643796d28e8f58a13a7dbf5d1a2706d26f25e27ea623a4673d4439",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03"
},
"mynet": {
"IPAMConfig": {},
"Links": null,
"Aliases": [
"49cb39a4e8e5"
],
"NetworkID": "37af7ae0184078932bbc234c1f4b15983777f566c36f7eb93e2b4b3437e460a7",
"EndpointID": "fd1f776954723a705edef323b63588cfc93cca7b80b15f22414b72454e14e48c",
"Gateway": "172.18.0.1",
"IPAddress": "172.18.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:12:00:02"
}
}
}
}
]
My goal is to get only IP address of some-mysql container related to network interface mynet. If I do
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' some-mysql
I get: 172.17.0.3172.18.0.2 : they are IP addresses of default bridge network and my overlay network. How can i retrieve only some-mysql IP address of mynet interface?
You can specify the network name, without needing of range:
docker inspect -f '{{.NetworkSettings.Networks.mynet.IPAddress}}' some-mysql
Related
Docker was updated and asked me about factory reset because some files were corrupted. Ok, I did it. Now I can't connect to redis, but it worked before.
I use docker run -p 6379:6379 -d redis for running the latest redis.
I check it (printf "PING\r\n";) | nc localhost 6379 but nothing happen.
Docker version 20.10.5, build 55c4c88.
MacOS 11.2.3 (20D91)
Looks like a network issue with resolving from localhost to docker.
❯ docker inspect 6377a770196e
[
{
"Id": "6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f",
"Created": "2021-04-13T11:16:11.029910005Z",
"Path": "docker-entrypoint.sh",
"Args": [
"redis-server"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3981,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-04-13T11:16:12.472660785Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:de974760ddb2f32dbddb74b7bb8cff4c1eee06d43d36d11bbca1dc815173916e",
"ResolvConfPath": "/var/lib/docker/containers/6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f/hostname",
"HostsPath": "/var/lib/docker/containers/6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f/hosts",
"LogPath": "/var/lib/docker/containers/6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f/6377a770196edf1a804d482a89deda2e046817ecb827c2a1afa00b7920f9952f-json.log",
"Name": "/blissful_galois",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"6379/tcp": [
{
"HostIp": "",
"HostPort": "6379"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"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,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/3ea4acf29016fed55d4a2c29f109de3013e432a9b3f02e4fdc084d92750fa03a-init/diff:/var/lib/docker/overlay2/8ff9465854165041a94e97a4f10f56c96a9589b2bf6181f12c1d3797195e141d/diff:/var/lib/docker/overlay2/9bf938f8abdddd10c9a45b033e113e9981df4292d0a07f5eb1df56bc93e1a19e/diff:/var/lib/docker/overlay2/ab76326e67b49b0b5e89ba83f33ae9787aa4b75ec7497f08825d643e1f87dd02/diff:/var/lib/docker/overlay2/7baa2201e34a35ab376faa44542ec94b656bede1134c2f9b3761b7aefe4bfdff/diff:/var/lib/docker/overlay2/b7379d15235571165f01eae5d5136e04778421703e30e2ee5cdd0fe63c5e9d8d/diff:/var/lib/docker/overlay2/244fff080dbb5c84c603ee4a212686ab44b5c528ef117a92e55697c54d9d2edc/diff",
"MergedDir": "/var/lib/docker/overlay2/3ea4acf29016fed55d4a2c29f109de3013e432a9b3f02e4fdc084d92750fa03a/merged",
"UpperDir": "/var/lib/docker/overlay2/3ea4acf29016fed55d4a2c29f109de3013e432a9b3f02e4fdc084d92750fa03a/diff",
"WorkDir": "/var/lib/docker/overlay2/3ea4acf29016fed55d4a2c29f109de3013e432a9b3f02e4fdc084d92750fa03a/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "057a2307c4c2045ac412e59dda40201a9062c08115d4b67102afe3a05a5c1528",
"Source": "/var/lib/docker/volumes/057a2307c4c2045ac412e59dda40201a9062c08115d4b67102afe3a05a5c1528/_data",
"Destination": "/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "6377a770196e",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"6379/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.12",
"REDIS_VERSION=6.2.1",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-6.2.1.tar.gz",
"REDIS_DOWNLOAD_SHA=cd222505012cce20b25682fca931ec93bd21ae92cb4abfe742cf7b76aa907520"
],
"Cmd": [
"redis-server"
],
"Image": "redis",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "23d13da3b9d547635ca0519e5d2a358b46a3dd8234925d07a6dc0725b2a3eb4b",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"6379/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "6379"
}
]
},
"SandboxKey": "/var/run/docker/netns/23d13da3b9d5",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "3ce444ad8732cfbdb1cf59e90835a82b4ee2c5d56ec423ff5bdbce9b22836256",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "14088994d7e24bf472756c9b9204611d0698d29f7c9c34a79fa99788eac39b7c",
"EndpointID": "3ce444ad8732cfbdb1cf59e90835a82b4ee2c5d56ec423ff5bdbce9b22836256",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
I have created a docker container for redis but I am not able to connect the same instance with a redis client.
docker command i used to bring up my redis isntance
docker run --name localredis -p 6379:6379 -d redis
please find below my docker inspect of the container
[
{
"Id": "ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c",
"Created": "2021-01-26T16:07:13.477202002Z",
"Path": "docker-entrypoint.sh",
"Args": [
"redis-server"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2675,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-01-26T16:07:13.834485936Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:621ceef7494adfcbe0e523593639f6625795cc0dc91a750629367a8c7b3ccebb",
"ResolvConfPath": "/var/lib/docker/containers/ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c/hostname",
"HostsPath": "/var/lib/docker/containers/ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c/hosts",
"LogPath": "/var/lib/docker/containers/ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c/ea6adada84602054f1057dded66c474231fcfdabcb3b0797fd82da0ff558cd6c-json.log",
"Name": "/localredis",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": [
"66947da6a117e75cbbe696fad9e4cebd623d0209c94b63bdfb22d25ca723c074"
],
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"6379/tcp": [
{
"HostIp": "",
"HostPort": "6379"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"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,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/f89d87a8018ce297dc6b204fff66b5da39212bc8a063be3e14fbb43813a377ad-init/diff:/var/lib/docker/overlay2/74014cbeac95ded3e80f5ec0ba64aafc252846b7c7517d5f1e00ca0ae8436e0e/diff:/var/lib/docker/overlay2/7f220239171723472e6e62802bb1f6a3341e1f3003414bb6f5f35ac8fef326a7/diff:/var/lib/docker/overlay2/5ebf1767ac29a0f344fc2134218365426f354e90e60e4ab51f09f9d571ac073f/diff:/var/lib/docker/overlay2/39eb79b70bd7680a7153eea515f4478d24733a67687a853643f87ff718566259/diff:/var/lib/docker/overlay2/6f9e7e2d91dcd0fa1f8d0ca68b600230b724c8add6bfa4102f8da12e667a5a31/diff:/var/lib/docker/overlay2/b8782f485b043e4168304f049982cb78c1039b09dae95eaed596ce61eb9ffd12/diff",
"MergedDir": "/var/lib/docker/overlay2/f89d87a8018ce297dc6b204fff66b5da39212bc8a063be3e14fbb43813a377ad/merged",
"UpperDir": "/var/lib/docker/overlay2/f89d87a8018ce297dc6b204fff66b5da39212bc8a063be3e14fbb43813a377ad/diff",
"WorkDir": "/var/lib/docker/overlay2/f89d87a8018ce297dc6b204fff66b5da39212bc8a063be3e14fbb43813a377ad/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "1bb68817383777a30df146c139e4e8d97ef7ceb3d72e2eeaba5e45bed472df05",
"Source": "/var/lib/docker/volumes/1bb68817383777a30df146c139e4e8d97ef7ceb3d72e2eeaba5e45bed472df05/_data",
"Destination": "/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "ea6adada8460",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"6379/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.12",
"REDIS_VERSION=6.0.10",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-6.0.10.tar.gz",
"REDIS_DOWNLOAD_SHA=79bbb894f9dceb33ca699ee3ca4a4e1228be7fb5547aeb2f99d921e86c1285bd"
],
"Cmd": [
"redis-server"
],
"Image": "redis",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "62f19eea272849065d5dd21104f6fa7c7e385ed9cf8fbb518c59088bc48f5fdc",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"6379/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "6379"
}
]
},
"SandboxKey": "/var/run/docker/netns/62f19eea2728",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "f0d51b78c34b598b27fef608c824974407bdf235a4d289e23f935aa87d906ef9",
"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": "b3c2da1a7455de3deac167a7759678f293f5e9a8e886375867b7c64c30e12935",
"EndpointID": "f0d51b78c34b598b27fef608c824974407bdf235a4d289e23f935aa87d906ef9",
"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
}
}
}
}
]
I am trying to add this instance as below but getting error
Any help on this would be appreciated.
I ran a Docker image. Both the container and host ports are mapped to 5000, and it can be accessed using localhost but not with the IP address. I don't have any knowledge on network systems and I'm a beginner in Docker.
I'm using Docker app for Windows, and upon docker inspect, I got this JSON:
[
{
"Id": "c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7",
"Created": "2020-08-19T18:17:50.917578Z",
"Path": "java",
"Args": [
"-jar",
"/app.jar"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3142,
"ExitCode": 0,
"Error": "",
"StartedAt": "2020-08-19T18:17:53.0308405Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:04d86c26964a44e147a0132bc6f6810f5aeba005d655b0d0b86f04499fc6a7a1",
"ResolvConfPath": "/var/lib/docker/containers/c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7/hostname",
"HostsPath": "/var/lib/docker/containers/c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7/hosts",
"LogPath": "/var/lib/docker/containers/c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7/c38f489d712502ce57e5f6b86d8ad1efd3cf64d3c60ab3239bf34a727d0155b7-json.log",
"Name": "/blissful_noether",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"5000/tcp": [
{
"HostIp": "",
"HostPort": "5000"
}
]
},
"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": [
44,
168
],
"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,
"MaskedPaths": [
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/asound",
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/49e30cda4983fa70169660522eb0264adb6a86ba7714f051ceb7fe9ba2e6f921-init/diff:/var/lib/docker/overlay2/52cc6d89b46870d8613801fc85cb6f9fa38c0b37b07857de839acd4d001b5530/diff:/var/lib/docker/overlay2/e058a1965c0dff7fbaf1f2fbbe9dbbd491f273d3389c093a3aff1a2c928e305e/diff:/var/lib/docker/overlay2/ea09144ed7206c329c5dac727f9ddd3f346260a59b9e595916f17ee11c3b6d97/diff:/var/lib/docker/overlay2/53820238bb96c5ce804cc77ecbad212bcd3bf6d6a1ca5fdcc3f4d6f4e2349007/diff",
"MergedDir": "/var/lib/docker/overlay2/49e30cda4983fa70169660522eb0264adb6a86ba7714f051ceb7fe9ba2e6f921/merged",
"UpperDir": "/var/lib/docker/overlay2/49e30cda4983fa70169660522eb0264adb6a86ba7714f051ceb7fe9ba2e6f921/diff",
"WorkDir": "/var/lib/docker/overlay2/49e30cda4983fa70169660522eb0264adb6a86ba7714f051ceb7fe9ba2e6f921/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "df1fe5e69c6437bd3e43d737b5cf7b37f9c1c5325b5505964579fd093ed4beae",
"Source": "/var/lib/docker/volumes/df1fe5e69c6437bd3e43d737b5cf7b37f9c1c5325b5505964579fd093ed4beae/_data",
"Destination": "/tmp",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "c38f489d7125",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"5000/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin",
"LANG=C.UTF-8",
"JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk",
"JAVA_VERSION=8u212",
"JAVA_ALPINE_VERSION=8.212.04-r0"
],
"Cmd": null,
"ArgsEscaped": true,
"Image": "04d86c26964a",
"Volumes": {
"/tmp": {}
},
"WorkingDir": "",
"Entrypoint": [
"java",
"-jar",
"/app.jar"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "fb790b4e2c72fc9b2c9641e1eb91aca5e74759b2ee0265ce5a1907ddb3eb1865",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"5000/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "5000"
}
]
},
"SandboxKey": "/var/run/docker/netns/fb790b4e2c72",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "0f084ea8ca77ec70d850291644523b81597b761dabe687b4e0035b4ae2e3dd56",
"Gateway": "xxx.xx.x.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "xxx.xx.x.x",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:bc:19:10:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "51b3be5f2161bb70042d5efd31f5b611cea241248a142f46fa612352c",
"EndpointID": "0f084ea8ca77ec70d850291644523b81597b761dabe687b45b4ae2e3dd56",
"Gateway": "xxx.xx.x.1",
"IPAddress": "xxx.xx.x.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:bc:11:00:02",
"DriverOpts": null
}
}
}
}
]
[![ipconfig][1]][1]
I even just came to know that even a Docker container consists of IP. Why is it so? Can anyone help me understand how the container can be accessed with IP?
I have tried with all the IPs available in the JSON above and ipconfig image, but it does not work.
Yes, Docker containers have their Unique IP address(more in Kubernetes).
https://stackoverflow.com/a/43694284/9650284
refer this for an explanation(comments on the solutions). TLDR it is not possible to access the internal IP of the docker container from your host.
I am following the Docker page to run a local registry (https://docs.docker.com/registry/deploying/#run-a-local-registry). The registry container is running, but when I try to do docker push localhost:5000/nginx I get this error:
Get https://localhost:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I am, however, able to push using docker push 127.0.0.1:5000/nginx.
Any suggestions as to why this isn't working?
EDITED:
Here is my /etc/resolve.conf
domain bskyb.com
nameserver 172.20.220.26
nameserver 172.20.220.25
nameserver 10.5.212.21
The commands I ran:
[mwa51#OSTML0253700 ~] 2018-01-17 16:16:08$ docker push localhost:5000/nginx
The push refers to repository [localhost:5000/nginx]
Get https://localhost:5000/v2/: net/http: request canceled while
waiting for connection (Client.Timeout exceeded while awaiting headers)
[mwa51#OSTML0253700 ~] 2018-01-17 16:16:31$
[mwa51#OSTML0253700 ~] 2018-01-17 16:16:31$ docker push 127.0.0.1:5000/nginx
The push refers to repository [127.0.0.1:5000/nginx]
a103d141fc98: Layer already exists
73e2bd445514: Layer already exists
2ec5c0a4cb57: Layer already exists
1.13: digest:
sha256:926b086e1234b6ae9a11589c4cece66b267890d24d1da388c96dd8795b2ffcfb
size: 948
a103d141fc98: Layer already exists
73e2bd445514: Layer already exists
2ec5c0a4cb57: Layer already exists
latest: digest:
sha256:926b086e1234b6ae9a11589c4cece66b267890d24d1da388c96dd8795b2ffcfb
size: 948
[mwa51#OSTML0253700 ~] 2018-01-17 16:17:59$
And the output of docker inspect registry:
[
{
"Id": "bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7",
"Created": "2018-01-17T10:16:01.269327669Z",
"Path": "/entrypoint.sh",
"Args": [
"/etc/docker/registry/config.yml"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2431,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-01-17T16:15:32.851068237Z",
"FinishedAt": "2018-01-17T16:15:31.007531371Z"
},
"Image": "sha256:d1fd7d86a8257f3404f92c4474fb3353076883062d64a09232d95d940627459d",
"ResolvConfPath": "/var/lib/docker/containers/bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7/hostname",
"HostsPath": "/var/lib/docker/containers/bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7/hosts",
"LogPath": "/var/lib/docker/containers/bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7/bc9d9dd7e6d07d36176a542814375230c1d2e1f154993b832485f0b61af8c9d7-json.log",
"Name": "/registry",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"5000/tcp": [
{
"HostIp": "",
"HostPort": "5000"
}
]
},
"RestartPolicy": {
"Name": "always",
"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": [
0,
0
],
"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": {
"LowerDir": "/var/lib/docker/overlay2/cc234dacc7f73dbbb58dbab1ca0109e57d4a470c225e20daf69678a9c53cb8e2-init/diff:/var/lib/docker/overlay2/7acfd81c53735574cf334d7bb4779136cc8a510886105850c12af7cf785d56a5/diff:/var/lib/docker/overlay2/462af7abc4dc1df8e7760d274616fc98ec2484450ef92a38702370696c6b2e77/diff:/var/lib/docker/overlay2/2e74aa672b9a2f6fef960d9411725ffbbf0b0c233326915f089da46d597c8888/diff:/var/lib/docker/overlay2/37b9a8f667053beee899b031cec8e473f0273b3582ea20e4bea2477737bf0065/diff:/var/lib/docker/overlay2/1508860708a3fb5c720eee143063f02c852548e9f608b4e56470cba86d2b98a9/diff",
"MergedDir": "/var/lib/docker/overlay2/cc234dacc7f73dbbb58dbab1ca0109e57d4a470c225e20daf69678a9c53cb8e2/merged",
"UpperDir": "/var/lib/docker/overlay2/cc234dacc7f73dbbb58dbab1ca0109e57d4a470c225e20daf69678a9c53cb8e2/diff",
"WorkDir": "/var/lib/docker/overlay2/cc234dacc7f73dbbb58dbab1ca0109e57d4a470c225e20daf69678a9c53cb8e2/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "9f79a52daf7489c22409cf1629d01367d300a7f2519d3861579e43c73735a332",
"Source": "/var/lib/docker/volumes/9f79a52daf7489c22409cf1629d01367d300a7f2519d3861579e43c73735a332/_data",
"Destination": "/var/lib/registry",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "bc9d9dd7e6d0",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"5000/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/etc/docker/registry/config.yml"
],
"ArgsEscaped": true,
"Image": "registry:2",
"Volumes": {
"/var/lib/registry": {}
},
"WorkingDir": "",
"Entrypoint": [
"/entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "95e9979b7c9a9081262252d595c39b1601062f549b1ba16c7ac4fd7e1b5b04e8",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"5000/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "5000"
}
]
},
"SandboxKey": "/var/run/docker/netns/95e9979b7c9a",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "d55c67127f6fcb6a29c9aafcf3eda3f641f0854f2ae1054469b25142bb0f5f15",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "4dfe4b88f1906649d86797d7980908b7a6b5a5dadc40d9117340de6fd115e0f4",
"EndpointID": "d55c67127f6fcb6a29c9aafcf3eda3f641f0854f2ae1054469b25142bb0f5f15",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
And also:
[mwa51#OSTML0253700 ~] 2018-01-17 16:21:28$ echo $DOCKER_HOST
returns blank
I'm trying to use a docker image from here to start setting up a datascience set up. I can get docker to mount the container using
docker run -d --privileged=true -p 8888:8888 --name ipyn3 -v /home/repos/DoSomeData/:/home/ds/notebooks/ dataquestio/python3-starter
where the host directory "DoSomeData" contains a single folder at the moment "Hillary_Emails" which contains a directory of input data and a single iPython Notebook file.
When I go into ipython notebook, it can see the "Hillary_Emails" directory but nothing else. This is also the case when I log into the container using Bash and run ls. It appears to only be copying over the directory.
Running docker inspect ipyn3 gives
[
{
"Id": "b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433",
"Created": "2016-03-14T20:20:24.413863418Z",
"Path": "/home/ds/run_ipython.sh",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 7629,
"ExitCode": 0,
"Error": "",
"StartedAt": "2016-03-14T20:20:25.344852732Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:3cccab0c85e256d355fd7facbf3b897363bb72f7089ce7d65c54fe55b69ea25d",
"ResolvConfPath": "/var/lib/docker/containers/b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433/hostname",
"HostsPath": "/var/lib/docker/containers/b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433/hosts",
"LogPath": "/var/lib/docker/containers/b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433/b1cbba654135d46170e78c8ac522601ee743e1b1d3959b10fc7784c57c696433-json.log",
"Name": "/ipyn3",
"RestartCount": 0,
"Driver": "devicemapper",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/home/repos/DoSomeData/:/home/ds/notebooks/"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"8888/tcp": [
{
"HostIp": "",
"HostPort": "8888"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"ShmSize": 67108864,
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"KernelMemory": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null
},
"GraphDriver": {
"Name": "devicemapper",
"Data": {
"DeviceId": "57",
"DeviceName": "docker-253:0-2228497-91a65d788ceb1e1ed5a1ec339d19ba8de24ec574fad57982f6d939ec572df526",
"DeviceSize": "10737418240"
}
},
"Mounts": [
{
"Source": "/home/repos/DoSomeData",
"Destination": "/home/ds/notebooks",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "b1cbba654135",
"Domainname": "",
"User": "ds",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8888/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm",
"LANG=en_US.UTF-8",
"HOME=/home/ds",
"SHELL=/bin/bash",
"USER=ds"
],
"Cmd": [
"/home/ds/run_ipython.sh"
],
"Image": "dataquestio/python3-starter",
"Volumes": {
"/home/ds/notebooks": {}
},
"WorkingDir": "/home/ds/notebooks",
"Entrypoint": null,
"OnBuild": null,
"Labels": {},
"StopSignal": "SIGTERM"
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "84a7df65aa857432cc7bfcb7c28016eb40eee10c9a6eaf30c46fec3b69f2f673",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8888/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8888"
}
]
},
"SandboxKey": "/var/run/docker/netns/84a7df65aa85",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "c8fe87fc450a97422439751ae1400f44c28656a81375788be214d4b5c7b70686",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "7c709634cd55286747ac4080457e57290db1cdc774d290f59727436223ecf08a",
"EndpointID": "c8fe87fc450a97422439751ae1400f44c28656a81375788be214d4b5c7b70686",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02"
}
}
}
}
]
Does anyone know what is causing this? I'm running Fedora23 and this is the first time I've tried using docker containers. Is it something to do with how permissions are propagating?
Thanks
I ran docker inspect ipyn3 when it was working. Issue was that the source path needed my username after host i.e.
\home\user_name\repos\DoSomeData