4 ms·
Too late to edit my message, so I'll use a response instead. Docker rebinds the 127 network to each container, so you cant - by default - communicate through th
by y4mi 8y ago
Too late to edit my message, so I'll use a response instead. Docker rebinds the 127 network to each container, so you cant - by default - communicate through these IP Addresses.
An easy fix could be to just let the container use the hosts network stack (so, not network type: bridge).
After that, you can bind the daemons to specific IP Addresses in the subnet - i.e. 127.0.0.2:3306 DB1 127.0.0.3:3306 DB2 and they'll be able to communicate directly.
But as mentioned before: this is not the primary usecase for docker, so its cumbersome to use.