How do I access the var / www / root directory of a docker container through the host browser?

1

I'm starting in docker.

I created an image with the following command

docker run -ti -p 80:80 my-image

This image is a ubuntu: 14.04 where I installed apache and php5. I checked the root /var/www and the index page is there and php has installed php -v .

My host is ubuntu 16.04. I checked the ip of the docker through ifconfig and I have docker0 inet addr:172.17.0.1 .

Using the browser from my host I make 172.17.0.1:80 and I get the message "The connection was reset".

I was hoping to see the apache home page.

How to solve this?

    
asked by anonymous 14.09.2017 / 21:48

0 answers