Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker localhost process not working on Windows

Tags:

docker

windows

I am using Docker Quickstart Terminal to run a docker container. The container should work on port 8088 of localhost:

 docker run -it --name myContainer -p 8088:8088

However, when I go to localhost:8088 or 127.0.0.1:8088 I can't find any process running.

This works on OSX.

Why is this not working on Windows?

like image 440
octavian Avatar asked Dec 18 '16 13:12

octavian


1 Answers

I'm assuming you're using VirtualBox, since that's what is integrated with the Quickstart terminal.

The reason it doesn't work is that Windows isn't running your (Linux) containers natively, it's running them in a separate Linux-based VM. This VM is available under a different ip address than your "physical" machine, usually printed when you start the quickstart terminal:

enter image description here

This is the ip address you need to use in order to connect to published container ports.

like image 99
Trondh Avatar answered Oct 22 '22 15:10

Trondh