开发者社区> AAAAAAAA> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

Docker——网络通信(五)(4)

简介: Docker——网络通信(五)(4)
+关注继续查看

查看Tomcat01的网络信息


docker inspect tomcat01


发现只有一个网络信息


image.png


[
    {
        "Id": "706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b",
        "Created": "2021-07-17T06:57:12.245072309Z",
        "Path": "catalina.sh",
        "Args": [
            "run"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 8748,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-07-17T06:57:12.84813853Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:36ef696ea43d360827271a0d69475cb11fde0029d26fda66ea3204c116908597",
        "ResolvConfPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/hostname",
        "HostsPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/hosts",
        "LogPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b-json.log",
        "Name": "/tomcat01",
        "RestartCount": 0,
        "Driver": "devicemapper",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "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": {
                "DeviceId": "68",
                "DeviceName": "docker-253:0-34148462-17e715b9db6bd0796cc41f9da23748590ef6d8c118b414a1076ba02665040fd8",
                "DeviceSize": "10737418240"
            },
            "Name": "devicemapper"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "706eba52a567",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/tomcat/bin:/usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "JAVA_HOME=/usr/local/openjdk-11",
                "LANG=C.UTF-8",
                "JAVA_VERSION=11.0.11+9",
                "CATALINA_HOME=/usr/local/tomcat",
                "TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib",
                "LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib",
                "GPG_KEYS=48F8E69F6390C9F25CFEDCD268248959359E722B A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243",
                "TOMCAT_MAJOR=9",
                "TOMCAT_VERSION=9.0.50",
                "TOMCAT_SHA512=06cd51abbeebba9385f594ed092bd30e510b6314c90c421f4be5d8bec596c6a177785efc2ce27363813f6822af89fc88a2072d7b051960e5387130faf69c447b"
            ],
            "Cmd": [
                "catalina.sh",
                "run"
            ],
            "Image": "tomcat",
            "Volumes": null,
            "WorkingDir": "/usr/local/tomcat",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "1ad99fcf623a208d11b27a6d99e8b46d6091c4c310306f35bf6414deca78fb01",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "8080/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/1ad99fcf623a",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "4b453a7852e2d543e135ac1232464760a296e857e3f8b46f9d01d4500a0f8bb4",
            "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": "b15aa1ecc25828e428cfa89a3a33843e112499b5936fc4939336b2548244fd3f",
                    "EndpointID": "4b453a7852e2d543e135ac1232464760a296e857e3f8b46f9d01d4500a0f8bb4",
                    "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
                }
            }
        }
    }
]


image.png


image.png


[
    {
        "Id": "706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b",
        "Created": "2021-07-17T06:57:12.245072309Z",
        "Path": "catalina.sh",
        "Args": [
            "run"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 8748,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-07-17T06:57:12.84813853Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:36ef696ea43d360827271a0d69475cb11fde0029d26fda66ea3204c116908597",
        "ResolvConfPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/hostname",
        "HostsPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/hosts",
        "LogPath": "/var/lib/docker/containers/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b/706eba52a567f5fd3e5b29a4808aad4d8038a70973474fb0e88922f36b4c659b-json.log",
        "Name": "/tomcat01",
        "RestartCount": 0,
        "Driver": "devicemapper",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "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": {
                "DeviceId": "68",
                "DeviceName": "docker-253:0-34148462-17e715b9db6bd0796cc41f9da23748590ef6d8c118b414a1076ba02665040fd8",
                "DeviceSize": "10737418240"
            },
            "Name": "devicemapper"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "706eba52a567",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/tomcat/bin:/usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "JAVA_HOME=/usr/local/openjdk-11",
                "LANG=C.UTF-8",
                "JAVA_VERSION=11.0.11+9",
                "CATALINA_HOME=/usr/local/tomcat",
                "TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib",
                "LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib",
                "GPG_KEYS=48F8E69F6390C9F25CFEDCD268248959359E722B A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243",
                "TOMCAT_MAJOR=9",
                "TOMCAT_VERSION=9.0.50",
                "TOMCAT_SHA512=06cd51abbeebba9385f594ed092bd30e510b6314c90c421f4be5d8bec596c6a177785efc2ce27363813f6822af89fc88a2072d7b051960e5387130faf69c447b"
            ],
            "Cmd": [
                "catalina.sh",
                "run"
            ],
            "Image": "tomcat",
            "Volumes": null,
            "WorkingDir": "/usr/local/tomcat",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "1ad99fcf623a208d11b27a6d99e8b46d6091c4c310306f35bf6414deca78fb01",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "8080/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/1ad99fcf623a",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "4b453a7852e2d543e135ac1232464760a296e857e3f8b46f9d01d4500a0f8bb4",
            "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": "b15aa1ecc25828e428cfa89a3a33843e112499b5936fc4939336b2548244fd3f",
                    "EndpointID": "4b453a7852e2d543e135ac1232464760a296e857e3f8b46f9d01d4500a0f8bb4",
                    "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
                },
                "tomcat-net": {
                    "IPAMConfig": {},
                    "Links": null,
                    "Aliases": [
                        "706eba52a567"
                    ],
                    "NetworkID": "e4b86298c1b57f26bc38a8c326347a999c0072a044f89427a3da0a3a3ff86315",
                    "EndpointID": "8b54d4d05487ade73362f8ebe389e638ac7153e59d3778d270900d9ec7824195",
                    "Gateway": "172.18.0.1",
                    "IPAddress": "172.18.0.3",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:12:00:03",
                    "DriverOpts": {}
                }
            }
        }
    }
]

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
Docker——网络通信(五)(3)
Docker——网络通信(五)(3)
0 0
Docker——网络通信(五)(2)
Docker——网络通信(五)(2)
0 0
容器docker不同主机之间互联-macvlan
容器docker不同主机之间互联-macvlan
0 0
docker (容器安装软件)鲨掉入门.第二篇
docker (容器安装软件)鲨掉入门.第二篇
0 0
Docker容器数据卷入门教程(超详细)
docker的理念将运行的环境打包形成容器运行,运行可以伴随容器,但是我们对数据的要求是希望持久化,容器之间可以共享数据,Docker容器产生的数据,如果不通过docker commit生成新的镜像,使得数据作为容器的一部分保存下来,那么当容器被删除之后,数据也就没了。为了能够保存数据,在docker容器中使用卷。
0 0
docker容器数据备份恢复
描述docker容器服务数据备份和回复操作
0 0
Docker 容器数据卷用 V 命令添加 | 学习笔记
快速学习 Docker 容器数据卷用 V 命令添加
0 0
Docker 容器数据卷用 DockerFile 添加 | 学习笔记
快速学习 Docker 容器数据卷用 DockerFile 添加
0 0
Docker 容器数据卷介绍 | 学习笔记
快速学习 Docker 容器数据卷介绍
0 0
Docker 容器数据卷 volumes-from | 学习笔记
快速学习 Docker 容器数据卷 volumes-from
0 0
+关注
文章
问答
文章排行榜
最热
最新
相关电子书
更多
Docker 网络深度解读
立即下载
Docker 镜像原理和最佳实践
立即下载
我的Docker:Docker插件机制详解
立即下载