skip to Main Content

On a Windows machine I am able to use 192.168.65.2 as the address of the host machine both on the host machine and inside any container.

Is there a similar (192.168.xx.x etc.) IP for the host machine on a Mac?

Note: I specifically need the ip address (as in number), not a pseudonym, not a "-network=host" flag for starting a docker container, nor anything along those lines. I specifically need the number address if it exists.

2

Answers


  1. Chosen as BEST ANSWER

    It looks like 192.168.0.19 gets the job done. Not sure if it's going to be universal on every machine, but it can be extracted by running "ifconfig" and fishing for an IP address there.


  2. Any particular IP address will not be portable across systems.

    Is there a reason host.docker.internal doesn’t work for you?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search