Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

419
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda