Home > Software design >  Docker Mac Host IP Address
Docker Mac Host IP Address

Time:06-14

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.

CodePudding user response:

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.

CodePudding user response:

Any particular IP address will not be portable across systems.

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

  • Related