Docker localhost process not working on 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.

  • MongoDB connection reset inside Docker swarm mode
  • Docker increase disk space
  • How to send to stdin of a docker-py container?
  • docker-compose to access port on host machine
  • Access container environment variables in inline run command
  • Docker container shows running even after exit command
  • This works on OSX.

    Why is this not working on Windows?

  • Best practice for rails docker-compose db:create db:migrate
  • Run mysql instance in Docker container
  • Bind docker container to IP on OSX
  • How to start a docker container when windows boots
  • Live migration of a jboss/wildfly container with CRIU failed
  • Bind container port to host inside Dockerfile
  • 2 Solutions collect form web for “Docker localhost process not working on Windows”

    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.

    One possibility is the kind of VM you are using : HyperV (Docker For Windows) or VirtualBox (Docker Toolbox).

    If it is the later (which seems probable since you are using the Docker Quickstart Terminal), you need to port forward 8088 in order for your PC (localhost) to see it.
    See “How do I configure docker compose to expose ports correctly?” as an example when using VirtualBox.

    If localhost does not work, a docker-machine ip will show you the ip of the VM being executed.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.