dubbo
dubbo copied to clipboard
consumer ip in docker
run with docker --net=host
provider will using the host ip,
but the consumer ip using the docker bridge default ip
exp:
docker0 Link encap:Ethernet HWaddr 02:42:6b:5f:e7:f8
inet addr:192.168.13.1 Bcast:192.168.255.255 Mask:255.255.0.0
eth0 Link encap:Ethernet HWaddr 00:16:3e:0c:b3:d9
inet addr:10.4.2.13 Bcast:10.4.2.255 Mask:255.255.255.0
the default provider ip will be 10.4.2.13 but the default consumer ip bill be 192.168.13.1
how to let the default consumer ip to be the host ip
Please check this example: https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-docker