dondon
dondon

Reputation: 105

IP address and port of the host where Docker is running on?

I am quite new in this Docker thing and I am trying to get Eclipse Hono works with it according the official guide on Hono (https://eclipse.org/hono/getting-started/). I have some difficulties at the part where I must know the IP address and the port of the host on which Docker engine is running. I created a Ubuntu virtual box for the whole things, so does that mean this "host" is the VM ? Any ideas how can I get the exact IP and port ?

Upvotes: 0

Views: 1379

Answers (1)

Subodh Pachghare
Subodh Pachghare

Reputation: 154

In this case, your host is VM OS. Now Docker Engine doesn't have a port in general. On the host, a default network interface is created when Docker engine is installed, you can find details about it by using command docker network ls Depending upon your --network parameter to Docker daemon, the respective container will use the underlying network. Most likely it will be bridge under default configuration. Use docker network inspect bridge to find out the IP details. If you want to communicate outside of Host (VM in your case), then use Host networking --net=host parameter, which will inherit all network config from underlying OS & you can reach out to Docker Container service from outside world via your Virtualbox Bridge Interface.

Upvotes: 1

Related Questions