0

I'm using docker toolbox in my Win 7 desktop, I'm creating a container from nginx using the following command:

docker container run -p 8082:80 -v //c/Users/TestDocker/:/usr/share/nginx/ -d --rm nginx

The content in the container reflects what it is in my host folder:

enter image description here

In the container:

enter image description here

But the actual page display is this:

enter image description here

Obviously the same locally:

enter image description here

Nginx configuration file points to the same location as the bind is:

enter image description here

Any cloud on what am I doing wrong?

nighter
  • 125
  • 1
  • 2
  • 10
  • Open a new incognito window and try in that – Tarun Lalwani Aug 28 '17 at 19:04
  • Already done, it is not because cache – nighter Aug 28 '17 at 19:09
  • Kill the container and run it using `docker container run -p 8082:80 -v //c/Users/TestDocker/:/usr/share/nginx/ -it --rm nginx` so you can see what is happening when you hit the request – Tarun Lalwani Aug 28 '17 at 19:13
  • Thanks for your comment, @TarunLalwani, I did it an the common output rises up: 192.168.99.1 - - [28/Aug/2017:21:20:27 +0000] "GET / HTTP/1.1" 200 87 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" "-" What it is really interesting is other files in the bind are displayed correctly but index.html not – nighter Aug 28 '17 at 21:32
  • The VM in VirtualBox which is used by ToolBox, Go to Settings of it and Shared Folders Tab. Post the image of that in your question – Tarun Lalwani Aug 29 '17 at 05:09

1 Answers1

1

This is not worthy of an answer but I don't have the reputation to comment:

Your docker command maps 8082:80 but you're using port 8083 in the browser. Is there a chance you're interacting with the wrong container?

el_tigro
  • 1,099
  • 2
  • 10
  • 22
  • Sorry, my bad, I tried several containers with the same bind I just posted the wrong image, but the problem is still the same – nighter Aug 28 '17 at 19:30