3 ms·
What about getting the gateway address from inside the container: HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }')
by colordrops 10y ago
What about getting the gateway address from inside the container:
HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }')
- divideby0 10y agoThat works for some use cases, but for others (Elasticsearch, Zookeeper, Kafka, etc) the service inside the container needs to bind to an interface associated with an IP that's also addressable by the host. Even in host networking mode, eth0 inside a DFM-powered container will bound something like 192.168.x.y but that 192.168.x.0 subnet is completely inaccessible from the host.