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

75
Visualizações
Dockerfile weird behaviour when copying

I am building a dockerfile from a SPA using very basic js and html

I want to copy only some files to the docker image, but I am really struggling to do so as following: docker file commands

I have also tried several variations, i.e removing ./ from the index html, also doing it on one line using "array" style... But all these tries end up in writing the index.html content to all files, for example I will see the index html content inside the style.css,seeing it from the dev Tools on chrome. Therefore the page won't work as expected

The only workaround I have managed to get working is making a script using copy and placing everything on a "dist" folder, then copying everything on the folder to the docker image. That way it would work, but I'd prefer not to use a script and instead copy everything needed from the dockerfile straight away.

Any help is appreciated

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Okay, after more than 5h trying workarounds, I found out the question myself. Problem was not understanding COPY command, I was copying files to the root, instead of placing them on the correct folder: Correct Dockerfile

Notice the folder where every file is copied to

about 4 years ago · Juan Pablo Isaza 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