Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- core@cloud /srv/dockerFiles $ docker exec -it test1_web_1 bash
- root@aeab8846311e:/# ping proxy
- PING proxy (172.21.0.3): 56 data bytes
- 64 bytes from 172.21.0.3: icmp_seq=0 ttl=64 time=0.053 ms
- 64 bytes from 172.21.0.3: icmp_seq=1 ttl=64 time=0.073 ms
- 64 bytes from 172.21.0.3: icmp_seq=2 ttl=64 time=0.107 ms
- ^C--- proxy ping statistics ---
- 3 packets transmitted, 3 packets received, 0% packet loss
- round-trip min/avg/max/stddev = 0.053/0.078/0.107/0.000 ms
- root@aeab8846311e:/# ping app
- PING app (172.20.0.2): 56 data bytes
- 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
- 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
- 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
- 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
- ^C--- app ping statistics ---
- 5 packets transmitted, 0 packets received, 100% packet loss
- root@aeab8846311e:/# exit
- exit
- core@cloud /srv/dockerFiles $ docker inspect test1_web_1
- [
- {
- "Id": "aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28",
- "Created": "2017-03-05T11:02:44.887572818Z",
- "Path": "nginx",
- "Args": [
- "-g",
- "daemon off;"
- ],
- "State": {
- "Status": "running",
- "Running": true,
- "Paused": false,
- "Restarting": false,
- "OOMKilled": false,
- "Dead": false,
- "Pid": 9207,
- "ExitCode": 0,
- "Error": "",
- "StartedAt": "2017-03-05T11:02:46.115823611Z",
- "FinishedAt": "0001-01-01T00:00:00Z"
- },
- "Image": "sha256:6b914bbcb89e49851990e064568dceee4d53a462f316ec36207599c12ae9ba65",
- "ResolvConfPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/resolv.conf",
- "HostnamePath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/hostname",
- "HostsPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/hosts",
- "LogPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28-json.log",
- "Name": "/test1_web_1",
- "RestartCount": 0,
- "Driver": "overlay",
- "MountLabel": "system_u:object_r:svirt_lxc_file_t:s0:c120,c257",
- "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c120,c257",
- "AppArmorProfile": "",
- "ExecIDs": null,
- "HostConfig": {
- "Binds": [],
- "ContainerIDFile": "",
- "LogConfig": {
- "Type": "json-file",
- "Config": {}
- },
- "NetworkMode": "test1_back",
- "PortBindings": {},
- "RestartPolicy": {
- "Name": "",
- "MaximumRetryCount": 0
- },
- "AutoRemove": false,
- "VolumeDriver": "",
- "VolumesFrom": [],
- "CapAdd": null,
- "CapDrop": null,
- "Dns": null,
- "DnsOptions": null,
- "DnsSearch": null,
- "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,
- "CgroupParent": "",
- "BlkioWeight": 0,
- "BlkioWeightDevice": null,
- "BlkioDeviceReadBps": null,
- "BlkioDeviceWriteBps": null,
- "BlkioDeviceReadIOps": null,
- "BlkioDeviceWriteIOps": null,
- "CpuPeriod": 0,
- "CpuQuota": 0,
- "CpusetCpus": "",
- "CpusetMems": "",
- "Devices": null,
- "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": "overlay",
- "Data": {
- "LowerDir": "/var/lib/docker/overlay/2a8fa972f0694f954f96efb429a510c23d56f8617e4ebb3b6cd3c80ce520797e/root",
- "MergedDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/merged",
- "UpperDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/upper",
- "WorkDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/work"
- }
- },
- "Mounts": [],
- "Config": {
- "Hostname": "aeab8846311e",
- "Domainname": "",
- "User": "",
- "AttachStdin": false,
- "AttachStdout": false,
- "AttachStderr": false,
- "ExposedPorts": {
- "443/tcp": {},
- "80/tcp": {}
- },
- "Tty": false,
- "OpenStdin": false,
- "StdinOnce": false,
- "Env": [
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- "NGINX_VERSION=1.11.10-1~jessie"
- ],
- "Cmd": [
- "nginx",
- "-g",
- "daemon off;"
- ],
- "Image": "nginx",
- "Volumes": null,
- "WorkingDir": "",
- "Entrypoint": null,
- "OnBuild": null,
- "Labels": {
- "com.docker.compose.config-hash": "46fd0dbcd674e7e63d1329a413bf4f9275d2fd93ccfb9f3a595467f4d373a1c5",
- "com.docker.compose.container-number": "1",
- "com.docker.compose.oneoff": "False",
- "com.docker.compose.project": "test1",
- "com.docker.compose.service": "web",
- "com.docker.compose.version": "1.11.2"
- }
- },
- "NetworkSettings": {
- "Bridge": "",
- "SandboxID": "f00c10a32806623120ddcfd315d51a649e414d2fe25c4362148805851df36c3c",
- "HairpinMode": false,
- "LinkLocalIPv6Address": "",
- "LinkLocalIPv6PrefixLen": 0,
- "Ports": {
- "443/tcp": null,
- "80/tcp": null
- },
- "SandboxKey": "/var/run/docker/netns/f00c10a32806",
- "SecondaryIPAddresses": null,
- "SecondaryIPv6Addresses": null,
- "EndpointID": "",
- "Gateway": "",
- "GlobalIPv6Address": "",
- "GlobalIPv6PrefixLen": 0,
- "IPAddress": "",
- "IPPrefixLen": 0,
- "IPv6Gateway": "",
- "MacAddress": "",
- "Networks": {
- "test1_back": {
- "IPAMConfig": null,
- "Links": null,
- "Aliases": [
- "web",
- "aeab8846311e"
- ],
- "NetworkID": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
- "EndpointID": "90b1576a13ed1a79d5db97161dde25b7013fc85821422f741e2a7d287048c17f",
- "Gateway": "172.20.0.1",
- "IPAddress": "172.20.0.3",
- "IPPrefixLen": 16,
- "IPv6Gateway": "",
- "GlobalIPv6Address": "",
- "GlobalIPv6PrefixLen": 0,
- "MacAddress": "02:42:ac:14:00:03"
- },
- "test1_front": {
- "IPAMConfig": null,
- "Links": null,
- "Aliases": [
- "web",
- "aeab8846311e"
- ],
- "NetworkID": "ab12890bada3cd931ff928fda9ee450de2db55721e655d774cffffc05c941e1e",
- "EndpointID": "8aad1e04f0dff8553f15883517285c0127668b217a36dfa244c0b7fba70a5975",
- "Gateway": "172.21.0.1",
- "IPAddress": "172.21.0.2",
- "IPPrefixLen": 16,
- "IPv6Gateway": "",
- "GlobalIPv6Address": "",
- "GlobalIPv6PrefixLen": 0,
- "MacAddress": "02:42:ac:15:00:02"
- }
- }
- }
- }
- ]
- core@cloud /srv/dockerFiles $ docker inspect test1_app_1
- [
- {
- "Id": "503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68",
- "Created": "2017-03-05T11:02:44.897935667Z",
- "Path": "nginx",
- "Args": [
- "-g",
- "daemon off;"
- ],
- "State": {
- "Status": "running",
- "Running": true,
- "Paused": false,
- "Restarting": false,
- "OOMKilled": false,
- "Dead": false,
- "Pid": 9137,
- "ExitCode": 0,
- "Error": "",
- "StartedAt": "2017-03-05T11:02:45.868324205Z",
- "FinishedAt": "0001-01-01T00:00:00Z"
- },
- "Image": "sha256:6b914bbcb89e49851990e064568dceee4d53a462f316ec36207599c12ae9ba65",
- "ResolvConfPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/resolv.conf",
- "HostnamePath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/hostname",
- "HostsPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/hosts",
- "LogPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68-json.log",
- "Name": "/test1_app_1",
- "RestartCount": 0,
- "Driver": "overlay",
- "MountLabel": "system_u:object_r:svirt_lxc_file_t:s0:c527,c946",
- "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c527,c946",
- "AppArmorProfile": "",
- "ExecIDs": null,
- "HostConfig": {
- "Binds": [],
- "ContainerIDFile": "",
- "LogConfig": {
- "Type": "json-file",
- "Config": {}
- },
- "NetworkMode": "test1_back",
- "PortBindings": {},
- "RestartPolicy": {
- "Name": "",
- "MaximumRetryCount": 0
- },
- "AutoRemove": false,
- "VolumeDriver": "",
- "VolumesFrom": [],
- "CapAdd": null,
- "CapDrop": null,
- "Dns": null,
- "DnsOptions": null,
- "DnsSearch": null,
- "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,
- "CgroupParent": "",
- "BlkioWeight": 0,
- "BlkioWeightDevice": null,
- "BlkioDeviceReadBps": null,
- "BlkioDeviceWriteBps": null,
- "BlkioDeviceReadIOps": null,
- "BlkioDeviceWriteIOps": null,
- "CpuPeriod": 0,
- "CpuQuota": 0,
- "CpusetCpus": "",
- "CpusetMems": "",
- "Devices": null,
- "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": "overlay",
- "Data": {
- "LowerDir": "/var/lib/docker/overlay/2a8fa972f0694f954f96efb429a510c23d56f8617e4ebb3b6cd3c80ce520797e/root",
- "MergedDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/merged",
- "UpperDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/upper",
- "WorkDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/work"
- }
- },
- "Mounts": [],
- "Config": {
- "Hostname": "503cb14ef6ec",
- "Domainname": "",
- "User": "",
- "AttachStdin": false,
- "AttachStdout": false,
- "AttachStderr": false,
- "ExposedPorts": {
- "443/tcp": {},
- "80/tcp": {}
- },
- "Tty": false,
- "OpenStdin": false,
- "StdinOnce": false,
- "Env": [
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- "NGINX_VERSION=1.11.10-1~jessie"
- ],
- "Cmd": [
- "nginx",
- "-g",
- "daemon off;"
- ],
- "Image": "nginx",
- "Volumes": null,
- "WorkingDir": "",
- "Entrypoint": null,
- "OnBuild": null,
- "Labels": {
- "com.docker.compose.config-hash": "448293eaea1a38f2f73bd1e045a1ed06de3babcf0b49f479f19fca754ac013fc",
- "com.docker.compose.container-number": "1",
- "com.docker.compose.oneoff": "False",
- "com.docker.compose.project": "test1",
- "com.docker.compose.service": "app",
- "com.docker.compose.version": "1.11.2"
- }
- },
- "NetworkSettings": {
- "Bridge": "",
- "SandboxID": "1c072149b5422c9a18609f0c72231e176463b3fd6a89cb47d058c62b5d38b1fc",
- "HairpinMode": false,
- "LinkLocalIPv6Address": "",
- "LinkLocalIPv6PrefixLen": 0,
- "Ports": {
- "443/tcp": null,
- "80/tcp": null
- },
- "SandboxKey": "/var/run/docker/netns/1c072149b542",
- "SecondaryIPAddresses": null,
- "SecondaryIPv6Addresses": null,
- "EndpointID": "",
- "Gateway": "",
- "GlobalIPv6Address": "",
- "GlobalIPv6PrefixLen": 0,
- "IPAddress": "",
- "IPPrefixLen": 0,
- "IPv6Gateway": "",
- "MacAddress": "",
- "Networks": {
- "test1_back": {
- "IPAMConfig": null,
- "Links": null,
- "Aliases": [
- "app",
- "503cb14ef6ec"
- ],
- "NetworkID": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
- "EndpointID": "9cb84a09cdad2e3601220e89f798870b5437c86f50407d8d1110311d1679a416",
- "Gateway": "172.20.0.1",
- "IPAddress": "172.20.0.2",
- "IPPrefixLen": 16,
- "IPv6Gateway": "",
- "GlobalIPv6Address": "",
- "GlobalIPv6PrefixLen": 0,
- "MacAddress": "02:42:ac:14:00:02"
- }
- }
- }
- }
- ]
- core@cloud /srv/dockerFiles $ docker network inspect test1_back
- [
- {
- "Name": "test1_back",
- "Id": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
- "Scope": "local",
- "Driver": "bridge",
- "EnableIPv6": false,
- "IPAM": {
- "Driver": "default",
- "Options": null,
- "Config": [
- {
- "Subnet": "172.20.0.0/16",
- "Gateway": "172.20.0.1/16"
- }
- ]
- },
- "Internal": false,
- "Containers": {
- "503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68": {
- "Name": "test1_app_1",
- "EndpointID": "9cb84a09cdad2e3601220e89f798870b5437c86f50407d8d1110311d1679a416",
- "MacAddress": "02:42:ac:14:00:02",
- "IPv4Address": "172.20.0.2/16",
- "IPv6Address": ""
- },
- "aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28": {
- "Name": "test1_web_1",
- "EndpointID": "90b1576a13ed1a79d5db97161dde25b7013fc85821422f741e2a7d287048c17f",
- "MacAddress": "02:42:ac:14:00:03",
- "IPv4Address": "172.20.0.3/16",
- "IPv6Address": ""
- }
- },
- "Options": {},
- "Labels": {}
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement