I am brand new to Docker. I cannot see my website on the local server - it just gives me a Nginx welcome page even though I am following the exact steps of my course and the Docker tutorial.
- I have a basic html file called index.html.
- In that same folder I created a Dockerfile without extension.
- In the Dockerfile I have :
COPY . /usr/share/nginx/html
- I then opened a terminal in the same directory as my html file and the Dockerfile
- I entered: docker build -t my-website ./ (it built successfully from what I can tell)
- Then I entered: docker run -d -p 80:80 my-website (it ran successfully from what I can tell)
- Then I went to http://localhost. All I see is this:
Things I have tried:
- Switching off my firewall
- I have Windows 10 (apparently it won’t work on Windows 7)
- Using my computer’s terminal rather than Git Bash
- Making sure my Dockerfile has no extension
Please can you help me figure out how to see my website on the localserver?