computations/root_digger

Cannot build Docker image from Dockerfile

Closed this issue · 5 comments

stitam commented

Many thanks for developing this package!

When I try to build the container from the Dockerfile I get the following error:

...
9 | >>> COPY .git/ root_digger/.git/
...
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::re5y43wcvwl0b85ud6u7rs4rs: "/.git": not found

Any ideas how this could be fixed?

Ah, did you by chance download the source as a zip file? In that case the .git directory doesn't exist. If this is the case, the fast solution is to download the repository via git. Otherwise, I will push an update to the dockerfile that fixes this soon.

stitam commented

No, I didn't download anything, I thought the Dockerfile contains all the instructions for building the image. Do you think adding either a git clone or a wget line to the Dockerfile would be a robust solution? I am happy to work on this an open a PR when I'm done.

No, the dockerfile currently pulls the files from the current directory, because I assumed that people would be building it from the cloned repository. However, I think your way is better, so I have changed the dockerfile to do this instead. Thank you so much for your suggestion. Let me know if the new version works for you.

Edit: "this" means clone the repo in the docker image as its being built

stitam commented

Thanks @computations, using the new Dockerfile I managed to build the container and it's working!

Awesome. Thanks again for your suggestions. Closing this issue now