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

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

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 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