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

74
Views
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 answers
Answer question

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