Reputation: 681
I have an application that I have been deploying that gets the local ip address to open up ports for communication it does. It is running on a vagrant / virtualbox setup. Everything was good. I recently installed docker to run a DB container.
What I am finding is that the existing application when it tries to get its IP Address is finding the docker0 address 172.x.x.x and things start breaking. If I destroy the docker0 adapter (sudo ip link del docker0) things go back to working.
Is there a way so that when the java application asks for the ip address it does not return the docker address?
Upvotes: 0
Views: 48
Reputation: 20726
Thats how docker works. You could run the Container in the Host-Network so it will use the "VM" IP.
docker run my_container --net=host
Upvotes: 1