0

I'm using Docker on a Mac, and I have a DB container (PostgreSQL), which I access from the Mac as localhost, or 127.0.0.1. Through the magic of Docker, it works.

I have a Windows 11 Parallels VM that I need to point at the Docker DB. Obviously, localhost is claimed by the local host (Windows), and I'm clueless as to what IP address that virtual machine might see my real machine as, or even if it might need the internal Docker IPs or something.

Has anyone already resolved this issue?

I tried localhost, of course, which is how I realized that the Windows VM's localhost was going to block the actual machine's localhost.

  • Related: https://stackoverflow.com/questions/40746453/how-to-connect-to-docker-host-from-container-on-windows-10-docker-for-windows – joanis Aug 20 '23 at 01:13

1 Answers1

0

I figured this out looking for something completely different. Here's how it shakes out.

On the Parallels Windows 11 VM, get the IP address that the virtual machine has acquired. This will be related to an IP address that the Mac will report as a 'Bridge'. The IP address in the Mac's Bridge entry will be the IP address to use for the Docker container with the database.

The network reported in the Docker containers isn't related. Docker is FM.