Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 17.51 KB | None | 0 0
  1. core@cloud /srv/dockerFiles $ docker exec -it test1_web_1 bash
  2. root@aeab8846311e:/# ping proxy
  3. PING proxy (172.21.0.3): 56 data bytes
  4. 64 bytes from 172.21.0.3: icmp_seq=0 ttl=64 time=0.053 ms
  5. 64 bytes from 172.21.0.3: icmp_seq=1 ttl=64 time=0.073 ms
  6. 64 bytes from 172.21.0.3: icmp_seq=2 ttl=64 time=0.107 ms
  7. ^C--- proxy ping statistics ---
  8. 3 packets transmitted, 3 packets received, 0% packet loss
  9. round-trip min/avg/max/stddev = 0.053/0.078/0.107/0.000 ms
  10. root@aeab8846311e:/# ping app
  11. PING app (172.20.0.2): 56 data bytes
  12. 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
  13. 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
  14. 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
  15. 92 bytes from aeab8846311e (172.20.0.3): Destination Host Unreachable
  16. ^C--- app ping statistics ---
  17. 5 packets transmitted, 0 packets received, 100% packet loss
  18. root@aeab8846311e:/# exit
  19. exit
  20. core@cloud /srv/dockerFiles $ docker inspect test1_web_1
  21. [
  22.     {
  23.         "Id": "aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28",
  24.         "Created": "2017-03-05T11:02:44.887572818Z",
  25.         "Path": "nginx",
  26.         "Args": [
  27.             "-g",
  28.             "daemon off;"
  29.         ],
  30.         "State": {
  31.             "Status": "running",
  32.             "Running": true,
  33.             "Paused": false,
  34.             "Restarting": false,
  35.             "OOMKilled": false,
  36.             "Dead": false,
  37.             "Pid": 9207,
  38.             "ExitCode": 0,
  39.             "Error": "",
  40.             "StartedAt": "2017-03-05T11:02:46.115823611Z",
  41.             "FinishedAt": "0001-01-01T00:00:00Z"
  42.         },
  43.         "Image": "sha256:6b914bbcb89e49851990e064568dceee4d53a462f316ec36207599c12ae9ba65",
  44.         "ResolvConfPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/resolv.conf",
  45.         "HostnamePath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/hostname",
  46.         "HostsPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/hosts",
  47.         "LogPath": "/var/lib/docker/containers/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28/aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28-json.log",
  48.         "Name": "/test1_web_1",
  49.         "RestartCount": 0,
  50.         "Driver": "overlay",
  51.         "MountLabel": "system_u:object_r:svirt_lxc_file_t:s0:c120,c257",
  52.         "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c120,c257",
  53.         "AppArmorProfile": "",
  54.         "ExecIDs": null,
  55.         "HostConfig": {
  56.             "Binds": [],
  57.             "ContainerIDFile": "",
  58.             "LogConfig": {
  59.                 "Type": "json-file",
  60.                 "Config": {}
  61.             },
  62.             "NetworkMode": "test1_back",
  63.             "PortBindings": {},
  64.             "RestartPolicy": {
  65.                 "Name": "",
  66.                 "MaximumRetryCount": 0
  67.             },
  68.             "AutoRemove": false,
  69.             "VolumeDriver": "",
  70.             "VolumesFrom": [],
  71.             "CapAdd": null,
  72.             "CapDrop": null,
  73.             "Dns": null,
  74.             "DnsOptions": null,
  75.             "DnsSearch": null,
  76.             "ExtraHosts": null,
  77.             "GroupAdd": null,
  78.             "IpcMode": "",
  79.             "Cgroup": "",
  80.             "Links": null,
  81.             "OomScoreAdj": 0,
  82.             "PidMode": "",
  83.             "Privileged": false,
  84.             "PublishAllPorts": false,
  85.             "ReadonlyRootfs": false,
  86.             "SecurityOpt": null,
  87.             "UTSMode": "",
  88.             "UsernsMode": "",
  89.             "ShmSize": 67108864,
  90.             "Runtime": "runc",
  91.             "ConsoleSize": [
  92.                 0,
  93.                 0
  94.             ],
  95.             "Isolation": "",
  96.             "CpuShares": 0,
  97.             "Memory": 0,
  98.             "CgroupParent": "",
  99.             "BlkioWeight": 0,
  100.             "BlkioWeightDevice": null,
  101.             "BlkioDeviceReadBps": null,
  102.             "BlkioDeviceWriteBps": null,
  103.             "BlkioDeviceReadIOps": null,
  104.             "BlkioDeviceWriteIOps": null,
  105.             "CpuPeriod": 0,
  106.             "CpuQuota": 0,
  107.             "CpusetCpus": "",
  108.             "CpusetMems": "",
  109.             "Devices": null,
  110.             "DiskQuota": 0,
  111.             "KernelMemory": 0,
  112.             "MemoryReservation": 0,
  113.             "MemorySwap": 0,
  114.             "MemorySwappiness": -1,
  115.             "OomKillDisable": false,
  116.             "PidsLimit": 0,
  117.             "Ulimits": null,
  118.             "CpuCount": 0,
  119.             "CpuPercent": 0,
  120.             "IOMaximumIOps": 0,
  121.             "IOMaximumBandwidth": 0
  122.         },
  123.         "GraphDriver": {
  124.             "Name": "overlay",
  125.             "Data": {
  126.                 "LowerDir": "/var/lib/docker/overlay/2a8fa972f0694f954f96efb429a510c23d56f8617e4ebb3b6cd3c80ce520797e/root",
  127.                 "MergedDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/merged",
  128.                 "UpperDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/upper",
  129.                 "WorkDir": "/var/lib/docker/overlay/7f90454cf6e350c1a7fb5cbfd13670dc0740df46e2f03828dd709f39b0acd539/work"
  130.             }
  131.         },
  132.         "Mounts": [],
  133.         "Config": {
  134.             "Hostname": "aeab8846311e",
  135.             "Domainname": "",
  136.             "User": "",
  137.             "AttachStdin": false,
  138.             "AttachStdout": false,
  139.             "AttachStderr": false,
  140.             "ExposedPorts": {
  141.                 "443/tcp": {},
  142.                 "80/tcp": {}
  143.             },
  144.             "Tty": false,
  145.             "OpenStdin": false,
  146.             "StdinOnce": false,
  147.             "Env": [
  148.                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  149.                 "NGINX_VERSION=1.11.10-1~jessie"
  150.             ],
  151.             "Cmd": [
  152.                 "nginx",
  153.                 "-g",
  154.                 "daemon off;"
  155.             ],
  156.             "Image": "nginx",
  157.             "Volumes": null,
  158.             "WorkingDir": "",
  159.             "Entrypoint": null,
  160.             "OnBuild": null,
  161.             "Labels": {
  162.                 "com.docker.compose.config-hash": "46fd0dbcd674e7e63d1329a413bf4f9275d2fd93ccfb9f3a595467f4d373a1c5",
  163.                 "com.docker.compose.container-number": "1",
  164.                 "com.docker.compose.oneoff": "False",
  165.                 "com.docker.compose.project": "test1",
  166.                 "com.docker.compose.service": "web",
  167.                 "com.docker.compose.version": "1.11.2"
  168.             }
  169.         },
  170.         "NetworkSettings": {
  171.             "Bridge": "",
  172.             "SandboxID": "f00c10a32806623120ddcfd315d51a649e414d2fe25c4362148805851df36c3c",
  173.             "HairpinMode": false,
  174.             "LinkLocalIPv6Address": "",
  175.             "LinkLocalIPv6PrefixLen": 0,
  176.             "Ports": {
  177.                 "443/tcp": null,
  178.                 "80/tcp": null
  179.             },
  180.             "SandboxKey": "/var/run/docker/netns/f00c10a32806",
  181.             "SecondaryIPAddresses": null,
  182.             "SecondaryIPv6Addresses": null,
  183.             "EndpointID": "",
  184.             "Gateway": "",
  185.             "GlobalIPv6Address": "",
  186.             "GlobalIPv6PrefixLen": 0,
  187.             "IPAddress": "",
  188.             "IPPrefixLen": 0,
  189.             "IPv6Gateway": "",
  190.             "MacAddress": "",
  191.             "Networks": {
  192.                 "test1_back": {
  193.                     "IPAMConfig": null,
  194.                     "Links": null,
  195.                     "Aliases": [
  196.                         "web",
  197.                         "aeab8846311e"
  198.                     ],
  199.                     "NetworkID": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
  200.                     "EndpointID": "90b1576a13ed1a79d5db97161dde25b7013fc85821422f741e2a7d287048c17f",
  201.                     "Gateway": "172.20.0.1",
  202.                     "IPAddress": "172.20.0.3",
  203.                     "IPPrefixLen": 16,
  204.                     "IPv6Gateway": "",
  205.                     "GlobalIPv6Address": "",
  206.                     "GlobalIPv6PrefixLen": 0,
  207.                     "MacAddress": "02:42:ac:14:00:03"
  208.                 },
  209.                 "test1_front": {
  210.                     "IPAMConfig": null,
  211.                     "Links": null,
  212.                     "Aliases": [
  213.                         "web",
  214.                         "aeab8846311e"
  215.                     ],
  216.                     "NetworkID": "ab12890bada3cd931ff928fda9ee450de2db55721e655d774cffffc05c941e1e",
  217.                     "EndpointID": "8aad1e04f0dff8553f15883517285c0127668b217a36dfa244c0b7fba70a5975",
  218.                     "Gateway": "172.21.0.1",
  219.                     "IPAddress": "172.21.0.2",
  220.                     "IPPrefixLen": 16,
  221.                     "IPv6Gateway": "",
  222.                     "GlobalIPv6Address": "",
  223.                     "GlobalIPv6PrefixLen": 0,
  224.                     "MacAddress": "02:42:ac:15:00:02"
  225.                 }
  226.             }
  227.         }
  228.     }
  229. ]
  230. core@cloud /srv/dockerFiles $ docker inspect test1_app_1
  231. [
  232.     {
  233.         "Id": "503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68",
  234.         "Created": "2017-03-05T11:02:44.897935667Z",
  235.         "Path": "nginx",
  236.         "Args": [
  237.             "-g",
  238.             "daemon off;"
  239.         ],
  240.         "State": {
  241.             "Status": "running",
  242.             "Running": true,
  243.             "Paused": false,
  244.             "Restarting": false,
  245.             "OOMKilled": false,
  246.             "Dead": false,
  247.             "Pid": 9137,
  248.             "ExitCode": 0,
  249.             "Error": "",
  250.             "StartedAt": "2017-03-05T11:02:45.868324205Z",
  251.             "FinishedAt": "0001-01-01T00:00:00Z"
  252.         },
  253.         "Image": "sha256:6b914bbcb89e49851990e064568dceee4d53a462f316ec36207599c12ae9ba65",
  254.         "ResolvConfPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/resolv.conf",
  255.         "HostnamePath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/hostname",
  256.         "HostsPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/hosts",
  257.         "LogPath": "/var/lib/docker/containers/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68/503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68-json.log",
  258.         "Name": "/test1_app_1",
  259.         "RestartCount": 0,
  260.         "Driver": "overlay",
  261.         "MountLabel": "system_u:object_r:svirt_lxc_file_t:s0:c527,c946",
  262.         "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c527,c946",
  263.         "AppArmorProfile": "",
  264.         "ExecIDs": null,
  265.         "HostConfig": {
  266.             "Binds": [],
  267.             "ContainerIDFile": "",
  268.             "LogConfig": {
  269.                 "Type": "json-file",
  270.                 "Config": {}
  271.             },
  272.             "NetworkMode": "test1_back",
  273.             "PortBindings": {},
  274.             "RestartPolicy": {
  275.                 "Name": "",
  276.                 "MaximumRetryCount": 0
  277.             },
  278.             "AutoRemove": false,
  279.             "VolumeDriver": "",
  280.             "VolumesFrom": [],
  281.             "CapAdd": null,
  282.             "CapDrop": null,
  283.             "Dns": null,
  284.             "DnsOptions": null,
  285.             "DnsSearch": null,
  286.             "ExtraHosts": null,
  287.             "GroupAdd": null,
  288.             "IpcMode": "",
  289.             "Cgroup": "",
  290.             "Links": null,
  291.             "OomScoreAdj": 0,
  292.             "PidMode": "",
  293.             "Privileged": false,
  294.             "PublishAllPorts": false,
  295.             "ReadonlyRootfs": false,
  296.             "SecurityOpt": null,
  297.             "UTSMode": "",
  298.             "UsernsMode": "",
  299.             "ShmSize": 67108864,
  300.             "Runtime": "runc",
  301.             "ConsoleSize": [
  302.                 0,
  303.                 0
  304.             ],
  305.             "Isolation": "",
  306.             "CpuShares": 0,
  307.             "Memory": 0,
  308.             "CgroupParent": "",
  309.             "BlkioWeight": 0,
  310.             "BlkioWeightDevice": null,
  311.             "BlkioDeviceReadBps": null,
  312.             "BlkioDeviceWriteBps": null,
  313.             "BlkioDeviceReadIOps": null,
  314.             "BlkioDeviceWriteIOps": null,
  315.             "CpuPeriod": 0,
  316.             "CpuQuota": 0,
  317.             "CpusetCpus": "",
  318.             "CpusetMems": "",
  319.             "Devices": null,
  320.             "DiskQuota": 0,
  321.             "KernelMemory": 0,
  322.             "MemoryReservation": 0,
  323.             "MemorySwap": 0,
  324.             "MemorySwappiness": -1,
  325.             "OomKillDisable": false,
  326.             "PidsLimit": 0,
  327.             "Ulimits": null,
  328.             "CpuCount": 0,
  329.             "CpuPercent": 0,
  330.             "IOMaximumIOps": 0,
  331.             "IOMaximumBandwidth": 0
  332.         },
  333.         "GraphDriver": {
  334.             "Name": "overlay",
  335.             "Data": {
  336.                 "LowerDir": "/var/lib/docker/overlay/2a8fa972f0694f954f96efb429a510c23d56f8617e4ebb3b6cd3c80ce520797e/root",
  337.                 "MergedDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/merged",
  338.                 "UpperDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/upper",
  339.                 "WorkDir": "/var/lib/docker/overlay/9c3e5a330fdc7a273bd87e48caf54ff52bc55364e3ba9971c2ecac49398d3576/work"
  340.             }
  341.         },
  342.         "Mounts": [],
  343.         "Config": {
  344.             "Hostname": "503cb14ef6ec",
  345.             "Domainname": "",
  346.             "User": "",
  347.             "AttachStdin": false,
  348.             "AttachStdout": false,
  349.             "AttachStderr": false,
  350.             "ExposedPorts": {
  351.                 "443/tcp": {},
  352.                 "80/tcp": {}
  353.             },
  354.             "Tty": false,
  355.             "OpenStdin": false,
  356.             "StdinOnce": false,
  357.             "Env": [
  358.                 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  359.                 "NGINX_VERSION=1.11.10-1~jessie"
  360.             ],
  361.             "Cmd": [
  362.                 "nginx",
  363.                 "-g",
  364.                 "daemon off;"
  365.             ],
  366.             "Image": "nginx",
  367.             "Volumes": null,
  368.             "WorkingDir": "",
  369.             "Entrypoint": null,
  370.             "OnBuild": null,
  371.             "Labels": {
  372.                 "com.docker.compose.config-hash": "448293eaea1a38f2f73bd1e045a1ed06de3babcf0b49f479f19fca754ac013fc",
  373.                 "com.docker.compose.container-number": "1",
  374.                 "com.docker.compose.oneoff": "False",
  375.                 "com.docker.compose.project": "test1",
  376.                 "com.docker.compose.service": "app",
  377.                 "com.docker.compose.version": "1.11.2"
  378.             }
  379.         },
  380.         "NetworkSettings": {
  381.             "Bridge": "",
  382.             "SandboxID": "1c072149b5422c9a18609f0c72231e176463b3fd6a89cb47d058c62b5d38b1fc",
  383.             "HairpinMode": false,
  384.             "LinkLocalIPv6Address": "",
  385.             "LinkLocalIPv6PrefixLen": 0,
  386.             "Ports": {
  387.                 "443/tcp": null,
  388.                 "80/tcp": null
  389.             },
  390.             "SandboxKey": "/var/run/docker/netns/1c072149b542",
  391.             "SecondaryIPAddresses": null,
  392.             "SecondaryIPv6Addresses": null,
  393.             "EndpointID": "",
  394.             "Gateway": "",
  395.             "GlobalIPv6Address": "",
  396.             "GlobalIPv6PrefixLen": 0,
  397.             "IPAddress": "",
  398.             "IPPrefixLen": 0,
  399.             "IPv6Gateway": "",
  400.             "MacAddress": "",
  401.             "Networks": {
  402.                 "test1_back": {
  403.                     "IPAMConfig": null,
  404.                     "Links": null,
  405.                     "Aliases": [
  406.                         "app",
  407.                         "503cb14ef6ec"
  408.                     ],
  409.                     "NetworkID": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
  410.                     "EndpointID": "9cb84a09cdad2e3601220e89f798870b5437c86f50407d8d1110311d1679a416",
  411.                     "Gateway": "172.20.0.1",
  412.                     "IPAddress": "172.20.0.2",
  413.                     "IPPrefixLen": 16,
  414.                     "IPv6Gateway": "",
  415.                     "GlobalIPv6Address": "",
  416.                     "GlobalIPv6PrefixLen": 0,
  417.                     "MacAddress": "02:42:ac:14:00:02"
  418.                 }
  419.             }
  420.         }
  421.     }
  422. ]
  423. core@cloud /srv/dockerFiles $ docker network inspect test1_back
  424. [
  425.     {
  426.         "Name": "test1_back",
  427.         "Id": "9df63303a04de0de82496a517f62f1dc65ac2f7693652909b7097fbf21901d19",
  428.         "Scope": "local",
  429.         "Driver": "bridge",
  430.         "EnableIPv6": false,
  431.         "IPAM": {
  432.             "Driver": "default",
  433.             "Options": null,
  434.             "Config": [
  435.                 {
  436.                     "Subnet": "172.20.0.0/16",
  437.                     "Gateway": "172.20.0.1/16"
  438.                 }
  439.             ]
  440.         },
  441.         "Internal": false,
  442.         "Containers": {
  443.             "503cb14ef6ec9720c2be77d24770ac36d08e368647f5c36ee42c6c090abf1b68": {
  444.                 "Name": "test1_app_1",
  445.                 "EndpointID": "9cb84a09cdad2e3601220e89f798870b5437c86f50407d8d1110311d1679a416",
  446.                 "MacAddress": "02:42:ac:14:00:02",
  447.                 "IPv4Address": "172.20.0.2/16",
  448.                 "IPv6Address": ""
  449.             },
  450.             "aeab8846311e780507addbac61dd0c7afc3913cf21f4a964a4457f304d929f28": {
  451.                 "Name": "test1_web_1",
  452.                 "EndpointID": "90b1576a13ed1a79d5db97161dde25b7013fc85821422f741e2a7d287048c17f",
  453.                 "MacAddress": "02:42:ac:14:00:03",
  454.                 "IPv4Address": "172.20.0.3/16",
  455.                 "IPv6Address": ""
  456.             }
  457.         },
  458.         "Options": {},
  459.         "Labels": {}
  460.     }
  461. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement