I’ve just come across Multipass and it looks perfect for what I want to do in terms of setting up a development environment. I’ve tested everything that I already have and it is working perfectly, BUT with one caveat - is there a way to get the host IP address from either within the docker containers running in Multipass, or failing that from within the Multipass VM itself?
The scenario is, I have a number of web server and FPM containers running in the Multipass VM and these work fine, everything seems okay at the moment. What I want to do though is have those containers connect to a MySQL server running on the host (in this case my MacBook Pro). So, visually - this is what I need…
Docker Container -> Guest (MP VM) -> Host [MacBook] (this is the IP address I want)
Failing that, is there any way that I can route a request from the container through the MP VM to the Mac for port 3306?
I can build the DB as a container yes, and that would probably work fine but I want to maintain the DB on my MacBook so I can use it any time sometimes without bothering to spin up the VMs etc
In short, I guess it boils down to what IP address do I need to use so that the Guest machine (and / or Docker containers running therein) can connect to the Host machine. The reverse works fine of course and I can connect to Portainer fine, and the web servers running inside the docker containers etc - I just need communication between the Guest and the Host to now work fine
Is this something I need to change in the set up of the MP VM?
Thanks in advance for any help