COPYing files to the docker image

I am building a custom docker image for a private service.


In my Dockerfile, i have the following

COPY myScript.R /myScript.R
COPY ../../application2/tool2/ /tool2

The first line, where it copies a single file at the same level as the Dockerfile is working fine.
But the second one, where it should copy a whole directory, does not. I get the following error

May 1 03:43:04 PM  #9 [3/5] COPY ../../application2/tool2 /tool2
May 1 03:43:04 PM  #9 ERROR: failed to calculate checksum of ref 51swj8hgz5qv4huxc47w80faj::mgapkppwzdmgt42bfigs8fpqb: "/application2/tool2": not found

When I configured the service on Render, I set the root directory to application1/r_image.

What am I doing wrong?

Thank you,

Jerome Tremblay

Ok, so this is more a problem of me not understanding Docker enough…

I moved the tool2 folder inside the image folder and it works.

Not ideal, but obviously a limitation of Docker rather than Render. I can deal with it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.