4 ms·
Uuh, 127.0.0.1 never leaves the physical machine. It's also a full subnet, so 127.0.0.254 would work as well. Dockers main usecase just isn't purely internal,
by y4mi 8y ago
Uuh, 127.0.0.1 never leaves the physical machine. It's also a full subnet, so 127.0.0.254 would work as well.
Dockers main usecase just isn't purely internal, do using that ip range wouldn't make any sense
- y4mi 8y agoToo 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.