I recently started learning docker.
i downloaded the httpd image from docker hub and mounted external source on containers "/var/www/html" and ran the container on host
docker run -dit --name mywebsite -p 8080:80 -v /home/sysadmin/site/:/var/www/html/ httpd:2.4
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4ddc01da41ef httpd:2.4 "httpd-foreground" 2 days ago Up 2 days 0.0.0.0:8080->80/tcp mywebsite
Now when i check using interactive terminal using "docker exec 4dd cat /var/www/html/index.html" i can see the index file is available in webserver DocumentRoot.
but when try to access from Host using curl command
curl localhost:8080 , it says file not found
404 Not Found
The requested URL was not found on this server.
Firewall and SELinux are not running on Host