1
I’m starting on 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 tbm installed php -v.
My host is Ubuntu 16.04.
I’ve checked Docker’s IP through ifconfig and I have docker0 inet addr:172.17.0.1.
Using my host’s browser I do 172.17.0.1:80 and have the message "The Connection was reset".
I was hoping to see the apache homepage.
How to solve this?
172.17.0.1must be the IP of the Docker machine, no? See the container’s IP withdocker inspect <seu_container> | awk '/IPAddress/ || /HostPort/', or justdocker inspect <seu_container>and look forIPAddress– Bruno César