启动了registry-web容器,但是宿主机访问映射容器端口不通,详情见下
空格丶白 2020-04-25 05:25:02 docker-registry-web 启动
docker run -d -p 8080:8080/tcp --name registry-web --link registry-srv \
-e REGISTRY_URL=http://10.5.221.11:8082/v2 \
-e REGISTRY_TRUST_ANY_SSL=true \
-e REGISTRY_NAME=localhost:5000 \
-e REGISTRY_READONLY=false \
docker-registry-web
docker ps
ba8535e91c39 docker-registry-web "start.sh" 3 hours ago Up 3 hours 0.0.0.0:8080->8080/tcp registry-web
docker port
8080/tcp -> 0.0.0.0:8080
iptables -L -n
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 172.17.0.2 tcp dpt:8083
ACCEPT tcp -- 0.0.0.0/0 172.17.0.3 tcp dpt:8080
ACCEPT tcp -- 0.0.0.0/0 172.17.0.4 tcp dpt:8084
宿主机ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:aeff:fe32:17c3 prefixlen 64 scopeid 0x20<link>
ether 02:42:ae:32:17:c3 txqueuelen 0 (Ethernet)
RX packets 105 bytes 6996 (6.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1011 bytes 45435 (44.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.172.11.14 netmask 255.255.255.0 broadcast 172.172.11.255
inet6 fe80::f816:3eff:fe2e:4305 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:2e:43:05 txqueuelen 1000 (Ethernet)
RX packets 9554040 bytes 11363958399 (10.5 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4424602 bytes 401350350 (382.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
curl -v http://10.5.221.11:8080
连接超时
telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'
脑子晕了,百度也查了很多东西,还是不得行,求助下