Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

420
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda