Identifying IP address of docker container service

Discussions related to using VirtualBox on Windows hosts.
Post Reply
sorcerer
Posts: 4
Joined: 6. Sep 2019, 22:17

Identifying IP address of docker container service

Post by sorcerer »

Hello All,
My work environment: Win10 Pro (with HyperV disabled), Vagrant (Ubuntu guest OS) & Virtual Box, running docker inside VM
I am running a Win msi build of an app on Win host.
I build the same app in docker (with different different port settings to avoid conflicts)
My goal is to send files from the host app to the docker app and vice versa.
In Virtual Box for the VM of this app, I enabled Host-Only network (with Etherenet Adapter Ethernet 2). The docker app is pointing at the IP address of this Ethernet 2 network.
I can sent data from the docker app to the host app.
However, I am unable to send data from the host app to the docker app. I am suspecting it is an IP issue (Identifying the IP of the container service).
Can someone please tell me, how do I identify the IP address of a running docker container so that I can point my app on Win host to it?

One additional thing I am not sure whether it is helpful.
Because I use Vagrant. In my vagrantfile, I setup a private network IP address. Using this IP address, I can open and access the UI of this docker app. But I failed to sent data from the desktop app to the running docker container app using that private network IP address.
Also, as a control experiment. I installed a different windows app on my Windows host. I am able to send and to receive data send from this new app to the above app located on the Windows host. The running docker container also have no problem sending data to this other app. So, my problem is getting data from Windows host to my docker container.

Thanks in advance.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Identifying IP address of docker container service

Post by scottgus1 »

Vagrant and Docker are not supported here on the Virtualbox forum. These programs use Virtualbox in ways we can't predict and we don't know how to fix them, or fix Virtualbox when controlled by them.

That said, if you can ping at least one way over a Virtualbox network, and even better both ways, then the Virtualbox network is working, and whatever you can do with a real Ethernet network you can do over a Virtualbox network.

Here's a way to know the guest's IP address when the network is Bridged: viewtopic.php?f=2&t=75130#p348690 Something similar may work for Host-Only. However, Guest Additions are required in the guest OS. And if there is another layer of virtualizing/Vagranting/Dockering going on, then all bets are off. Best to set static IP then.
Post Reply