docker run -d -p 8080:80 --name=WebServer8 -v /home/user/www:/usr/share/nginx/html nginx:latest
Can you confirm where your index.html file is located on the host machine?
It is under /home/user/www (attached image)
No Vishal, restart shouldn't have been required. There might be some other underlying cause. In any case, it's great that it worked out for you.
© Linux Academy. All rights reserved.
Pinehead® and the Linux Academy logo® is the registered trademark of Linux Academy in the U.S. and other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.