Docker Community Forums

Share and learn in the Docker community.

Get docker host ip accessible from both container and mac host

(Piotr) #1


Can someone tell me what need to be done in order to get in IP that is the same for containers as well as my mac.
Normally it should be docker0 or eth0 which on my machine is something like eth0 inside alpine is

i can ping it from the containers. However i can’t ping it from my osx terminal. Today the solution use my wifi local ip address and I need to change it in my compose file every time i go or get back from work…

For now my temoprary solution is to create an alias
sudo ifconfig en0 alias

but i’m wondering / trying to understand why pinging the

If someone can help me to understand i would be very grateful