代码显示的是已经运行,但是IP地址就是显示页面加载出错;PING IP显示无法访问目标主机。
docker inspect 4b1433540d6f
[
{
"Id": "4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4",
"Created": "2024-10-26T15:56:16.231594694Z",
"Path": "/sbin/init",
"Args": [
"/sbin/init"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2465,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-10-26T16:38:21.424691787Z",
"FinishedAt": "2024-10-26T16:38:13.068364069Z"
},
"Image": "sha256:252bbd10542bd95676c1c29a36b2576494a0d9f84300bdbe1517b6139004bd4c",
"ResolvConfPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/resolv.conf",
"HostnamePath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/hostname",
"HostsPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/hosts",
"LogPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4-json.log",
"Name": "/openwrt",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "unconfined",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "opnet",
"PortBindings": {},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
32,
112
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"LowerDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40-init/diff:/vol1/docker/overlay2/b95b33c5bfc5e700dac738d39aa5d741ee9e9512a77d0944cf294d74ee8ed4c4/diff",
"MergedDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/merged",
"UpperDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/diff",
"WorkDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "4b1433540d6f",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"22/tcp": {},
"443/tcp": {},
"53/tcp": {},
"7681/tcp": {},
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/sbin/init"
],
"Image": "piaoyizy/openwrt-x86:latest",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": [
"/sbin/init"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "f07faef253c61b44d8b9d9e646185927e9bde5c6228e4a4fcdbe4f5fe9d3f0b3",
"SandboxKey": "/var/run/docker/netns/f07faef253c6",
"Ports": {},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"opnet": {
"IPAMConfig": {
"IPv4Address": "192.168.31.254"
},
"Links": null,
"Aliases": null,
"MacAddress": "02:42:c0:a8:1f:fe",
"NetworkID": "9053a1e6ce56f7672454d585c93cf84ddba19792f61de5972904edf32190f54c",
"EndpointID": "b5fbdbb46677e74481860e4738b3a9e2632db9426708b060cc87eed869383298",
"Gateway": "192.168.31.1",
"IPAddress": "192.168.31.254",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DriverOpts": null,
"DNSNames": [
"openwrt",
"4b1433540d6f"
]
}
}
}
}
]
docker inspect 4b1433540d6f
[
{
"Id": "4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4",
"Created": "2024-10-26T15:56:16.231594694Z",
"Path": "/sbin/init",
"Args": [
"/sbin/init"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2465,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-10-26T16:38:21.424691787Z",
"FinishedAt": "2024-10-26T16:38:13.068364069Z"
},
"Image": "sha256:252bbd10542bd95676c1c29a36b2576494a0d9f84300bdbe1517b6139004bd4c",
"ResolvConfPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/resolv.conf",
"HostnamePath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/hostname",
"HostsPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/hosts",
"LogPath": "/vol1/docker/containers/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4/4b1433540d6f12b92521a3f8963a2776fadf84889c5d86cac154f878a7a75da4-json.log",
"Name": "/openwrt",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "unconfined",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "opnet",
"PortBindings": {},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
32,
112
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"LowerDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40-init/diff:/vol1/docker/overlay2/b95b33c5bfc5e700dac738d39aa5d741ee9e9512a77d0944cf294d74ee8ed4c4/diff",
"MergedDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/merged",
"UpperDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/diff",
"WorkDir": "/vol1/docker/overlay2/cd31dc5b2c3ae44bd87c08c20e7a9cd74d8a303a6caad0bcf6f2a23fc8c06b40/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "4b1433540d6f",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"22/tcp": {},
"443/tcp": {},
"53/tcp": {},
"7681/tcp": {},
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/sbin/init"
],
"Image": "piaoyizy/openwrt-x86:latest",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": [
"/sbin/init"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "f07faef253c61b44d8b9d9e646185927e9bde5c6228e4a4fcdbe4f5fe9d3f0b3",
"SandboxKey": "/var/run/docker/netns/f07faef253c6",
"Ports": {},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"opnet": {
"IPAMConfig": {
"IPv4Address": "192.168.31.254"
},
"Links": null,
"Aliases": null,
"MacAddress": "02:42:c0:a8:1f:fe",
"NetworkID": "9053a1e6ce56f7672454d585c93cf84ddba19792f61de5972904edf32190f54c",
"EndpointID": "b5fbdbb46677e74481860e4738b3a9e2632db9426708b060cc87eed869383298",
"Gateway": "192.168.31.1",
"IPAddress": "192.168.31.254",
"IPPrefixLen": 24,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DriverOpts": null,
"DNSNames": [
"openwrt",
"4b1433540d6f"
]
}
}
}
}
]