Docker Community Forums

Share and learn in the Docker community.

How to use docker container ip as a localhost output, not the default host ip in the computer (running in localhost environment which docker uses)?

how to use ip container as localhost output, not the default host ip in the computer (running in localhost environment which docker uses)?

i have current setup

local computer > hyper-v > ubuntu 16.04 lts > docker

  • created a container > installed ubuntu > installed apache
  • i have tried to use the container ip but apache page wont load
  • when i tried use the localhost host ip in my computer the apache loads the page that tells it works…
    = my goal is to create local LAMP environment, current problem i need to output the result in the browser using the docker container ip… please help thank you

how can i use the docker container ip as a localhost output in the browser? please…

thanks