Docker Community Forums

Share and learn in the Docker community.

Unable to access my first container (on

(Nzeetee) #1

Hi all, first post - please excuse incorrect placing or details.

I’ve just started up a Docker Wildfly container on Windows Toolbox ((i’m running Windows 10 Home). If I docker inspect{my_container} ( see an IPAddress of but if I try and connect to that on any of the mapped ports (9990 and 8080) connection is refused.

I’ve followed this:

which would suggest that it should work, but I wonder whether the host binds this 172.x.x.x address to something in my local range 192.x.x.x or something?

If I try using the Kitematic GUI, I can click on the ‘settings’ tab it shows me for a similar Wildfly container.

Any idea how I can find the appropriate IP address of a simple container I setup using the CLI?

Many thanks

(John Rofrano) #2

The IP address is internal to the virtual machine that is running the Docker engine. You won’t be able to access it from your Windows host. The actual IP address of that virtual machine should be which is the IP that ports would be mapped to if, in fact, you mapped any ports.

Assuming you used the example from Docker Hub:

docker run -p 8080:8080 -p 9990:9990 -it jboss/wildfly /opt/jboss/wildfly/bin/ -bmanagement

The container ports will be mapped to and respectively.


(Nzeetee) #3

Wonderful - many thanks, this appears to be true!

In order that I can help myself in the future - how are you able to know that it presented on ? Is this something that I can query through an interface?

(John Rofrano) #4

I don’t use Windows (I’m on a Mac) but if I remember correctly you could use:

docker-machine ip

and it would return the IP address of the virtual machine that Docker Toolbox is using.

When I did use Docker Toolbox for Mac I would see the VM when it was brought up and I would get this message of the day:

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/

docker is configured to use the default machine with IP
For help getting started, check out the docs at

That would tell me that the IP address was Also, Docker Toolbox was using VirtualBox when I use to use it so I could open the VirtualBox GUI and check what the IP address was for the virtual machine.

Either way is the default IP so it’s just something you remember after a while.


(David Maze) #5

The docker inspect IP address is basically useless and you should never look it up.

If you’re running on Docker Toolbox, you need to do two things:

(1) Publish a port from your container using docker run -p 12345:8080 -p 12346:9990; and

(2) Access the service as or …:12346.

The two ports for -p are an external and internal TCP port number, so port 12345 on the outside maps to port 8080 inside the container. These could match if you wanted to.

(Nzeetee) #6

Thanks people, you’ve been amazing. All your answers worked brilliantly.

Being new to docker is a bit odd! I can’t quite work out what will happen when I want to run two different containers on two different IP addresses, but I’ll pull down a tomcat container and find out!

Thanks so much