Get docker host ip accessible from both container and mac host

Hi,

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 192.168.65.2

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 192.168.27.27 255.255.255.0

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

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