Docker Community Forums

Share and learn in the Docker community.

Access localhost container


(Nohaibogdan1) #1

Hello everyone,

On my Windows I have installed VirtualBox, on VirtualBox I have installed centos 7 minimal on which it is installed docker. I can access through curl command a container from centos terminal. The question is how can I access localhost docker container from windows browser.
I run container with this:
docker run -p 4000:80 container_name.
Accessing with curl localhost:4000 works on centos but on windows browser it doesn’t work.

Thank you very much!!


(Werner Dijkerman) #2

You will need to use the ip of the VirtualBox instance instead of localhost in your browser.