I'm new to Docker and trying to understand what is the best way to insert docker parent host ip into container hosts file.
I'm using the following command in my Dockerfile
RUN /sbin/ip route|awk '/default/ { print $3,"\tdockerhost" }' >> /etc/hosts
but sometimes hosts ip get change so its non relevant anymore...
The reason to do that, if you ask yourself, is that i need to access another 2 dockers containers (and link not offer this feature).
Thanks,