Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

424
Views
Cannot mount file as a volume in nginx

I am new to Docker and I have only started learning. I have faced a problem to mount index.html in Nginx. I am using Docker Toolbox for Windows 10 Home. I set the shared folder for my virtual machine 1.

When I want to mount a server with index.html I see the problem 404 Not Found. I use the following command to do this.

docker container run --name con6 -p 80:80 -v /c/Docker/html://usr/share/nginx/html nginx

Could somebody help me? Thank you in the advance

I have the following input after loading localhost:

2020/03/29 21:59:14 [error] 6#6: *1 "/usr/share/nginx/html/index.html/index.html" is not found (20: Not a directory), client: 192.168.99.1, server: localhost, request: "GET /index.html/ HTTP/1.1", host: "192.168.99.100"

192.168.99.1 - - [29/Mar/2020:21:59:14 +0000] "GET /index.html/ HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" "-"

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Can you please run the below command to mount the HTML into the container.

docker container run --name con6 -p 80:80 --mount type=bind,source="/c/Docker/html",target="/usr/share/nginx/html" nginx

For reference:- https://docs.docker.com/storage/bind-mounts/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!