I have the following setup:
- OSX runs MySQL, listening to all network adapters on port 3306
- XDEBUG has activated IDE listening on port 9000 on the OSX base system.
- host of the docking machine running on an OSX system with ip 192.168.99.100 host
- A debian-based docker container with the mysql client running on the docker host and HHVM running on xdebug, which wants to connect to a successful remote host on port 9000.
Often IP addresses often change in the OSX system due to the destination via DHCP, so I want the docker container to somehow get to the mysql server, regardless of what IP address is assigned to the OSX network adapters (without manual updating) . Also, I need a stable ip. I can provide the HHVM server.ini host-host file for Xdebug.
When starting the base Linux system, this is not a problem, since the docker host and the actual native computer that works with the docker are the same. In addition, there are several ways that the container can find out about the host IP address, so the problem does not get into the docker host server.
However, in OSX running a docking machine, the host is not a native OSX system, but instead is a virtual machine running in a virtual box (assuming you use the vb driver ,?).
The only thing I could think of was to send a request for 3306 to the docker host (192.168.99.100, which never changes) to the OSX 3306 port. Then the container will go to the dock machine host for Mysql queries, IF this works, I could rinse and repeat for any port I that I need to bind, like xdebug on port 9000.
Does anyone know how to do this or is there another suggestion?
docker virtualbox docker-machine
Ray
source share