I'm new to Docker and currently following this tutorial:
I created the necessary files and I made it up to display "Hello World!" on localhost:80.
Beyond that point, I tried to mount the container using the direct reference to my folder so I can update the index.php file to mimic the development evironment, and then I come with this error:
All I did is change the way the image is ran so I can update the content of the index.php file and see the changes reflect in the webpage when I hit F5.
Currently using Docker for Windows on Windows 10 Pro
Docker for Windows is running
I followed every steps scrupulously so I don't get myself fooled and it didn't work for me it seems.
To answer Mornor's question, here is the result for docker ps
And here for docker logs [container-name]
And since I now better understand what happens under the hood, how do I go to solve my problem illustrated in the log?
Here is my Dockfile
And the command I executed to run my image:
docker run -p 80:80 -v /wmi/tutorials/docker/src/:/var/www/html/ hello-world
And so you see that the file exists:
Error is coming from Apache which tries to show you the directory contents as there is no index file available. Either your docker mapping is not working correctly, or your apache does not have php support installed on it. You are accessing http://localhost, try http://localhost/index.php.
If you get same error, problem is with mapping. If you get php code the problem is with missing PHP support in Apache.