docker swarm 使用calico网络无法映射端口


docker inspect dubbo
[
{
"Id": "87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78",
"Created": "2017-03-17T09:18:09.220755175Z",
"Path": "/yschome/appserver/apache-tomcat-7.0.62/bin/config-run.sh",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 6891,
"ExitCode": 0,
"Error": "",
"StartedAt": "2017-03-17T09:18:09.908214117Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:728e9b8f5604da8c24c940010743b7172adfc38362aded332d313bc8653f552b",
"ResolvConfPath": "/yschome/data/docker/containers/87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78/resolv.conf",
"HostnamePath": "/yschome/data/docker/containers/87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78/hostname",
"HostsPath": "/yschome/data/docker/containers/87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78/hosts",
"LogPath": "/yschome/data/docker/containers/87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78/87fb249a7e905a1a48e6012d813af6257cd6ee6606d278576321ce281bb7df78-json.log",
"Node": {
"ID": "2NUR:BKF4:OV3G:GR3Z:FGGH:PC2B:AJ54:ZJSB:4I6K:ZFNG:4OCN:NDYZ",
"IP": "10.20.141.24",
"Addr": "10.20.141.24:2375",
"Name": "docker.swarm05",
"Cpus": 8,
"Memory": 8371798016,
"Labels": {
"kernelversion": "3.10.0-327.el7.x86_64",
"operatingsystem": "CentOS Linux 7 (Core)",
"storagedriver": "overlay"
},
"Version": "17.03.0-ce",
"DeltaDuration": 315577224886
},
"Name": "/dubbo",
"RestartCount": 0,
"Driver": "overlay",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "my-net",
"PortBindings": {
"8080/tcp": [
{
"HostIp": "",
"HostPort": "9980"
}
]
},
"RestartPolicy": {
"Name": "always",
"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": 1073741824,
"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": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 2147483648,
"MemorySwappiness": -1,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Name": "overlay",
"Data": {
"LowerDir": "/yschome/data/docker/overlay/3231e1d2d2a7ed64c1bd7221038a68d469d9d16ebc42eea11a36cad4ff5f0a58/root",
"MergedDir": "/yschome/data/docker/overlay/ad693eb4d73a6953217df5f75930063f2647a89e59807132ce46523544b11784/merged",
"UpperDir": "/yschome/data/docker/overlay/ad693eb4d73a6953217df5f75930063f2647a89e59807132ce46523544b11784/upper",
"WorkDir": "/yschome/data/docker/overlay/ad693eb4d73a6953217df5f75930063f2647a89e59807132ce46523544b11784/work"
}
},
"Mounts": [],
"Config": {
"Hostname": "dubbo",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"ZK_SLAVE1=zookeeper-2.my-net:2181",
"ZK_SLAVE2=zookeeper-3.my-net:2181",
"ZK_PATH=mcm-demo,common",
"ZK_MASTER=zookeeper-1.my-net:2181",
"CURRENT_APP=dubbo",
"ROCKETMQ_2=rocketmq-2:9876",
"ROCKETMQ_1=rocketmq-1:9876",
"NAME_SPACE=test06",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/yschome/appserver/jdk/bin",
"JAVA_VERSION_MAJOR=7",
"JAVA_VERSION_MINOR=79",
"JAVA_VERSION_BUILD=15",
"JAVA_PACKAGE=jdk",
"JAVA_JCE=unlimited",
"JAVA_HOME=/yschome/appserver/jdk",
"GLIBC_VERSION=2.23-r3",
"LANG=C.UTF-8",
"CATALINA_HOME=/yschome/appserver/apache-tomcat-7.0.62",
"CATALINA_BASE=/yschome/appserver/apache-tomcat-7.0.62"
],
"Cmd": [
"/yschome/appserver/apache-tomcat-7.0.62/bin/config-run.sh"
],
"ArgsEscaped": true,
"Image": "10.20.145.240/devrepo/dubbo:1.0",
"Volumes": null,
"WorkingDir": "/yschome/appserver/apache-tomcat-7.0.62",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "098b0b31cf30aa817b958d14d73eaa80e40b009d4e76856bb7d846fd6c1554b5",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "dubbo",
"com.docker.compose.service": "dubbo",
"com.docker.compose.version": "1.11.2",
"com.docker.swarm.id": "5d76388187a7e97ec1967102411218ba4d229a8426065ae53fd0fdea9446990e",
"com.docker.swarm.reschedule-policies": "[\"on-node-failure\"]",
"service_domain": "dubbo.test06.youmenlu.com",
"service_type": "java"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "d0c21b5b065b871c0a5f073eba23d9520c24a2a6237c1f4fe1c4f7659e1fbde5",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/d0c21b5b065b",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"my-net": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"dubbo",
"bae097a4fc90",
"87fb249a7e90"
],
"NetworkID": "e99744c4b6e76e3e08e64e760b7ed88475197347a698d33e5fb9ad6198ee568b",
"EndpointID": "e975ac95d2c9d0063e7cbc164ffa693451559f15034285419933811823547a76",
"Gateway": "169.254.1.1",
"IPAddress": "192.168.176.1",
"IPPrefixLen": 32,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "ee:ee:ee:ee:ee:ee"
}
}
}
}
]

docker ps 无法看到dubbo映射出来的端口
已邀请:

要回复问题请先登录注册