Docker image failes to copy
.git
directory

oleggulevskyyHOBBY

a year ago

I wonder what am I doing wrong, as it seems like a trivial thing - copying a git directory onto the machine but it fails at this step.

#15 CANCELED



-----

> [11/32] COPY .git ./.git:

-----



Dockerfile:13

-------------------

11 |     COPY unicorn/component/package.json ./unicorn/component/package.json

12 |     COPY file-upload/package.json ./file-upload/package.json

13 | >>> COPY .git ./.git

14 |

15 |     ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

-------------------

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ddffb5fd-75d2-46a7-a72d-fa700071e8dc::t5indqmujowf4cd2qxu4ox7cn: "/.git": not found

Here is the entire Docker file
https://github.com/with-labs/popspace/blob/main/Dockerfile

0 Replies

a year ago

why would you want to copy the .git directory?


oleggulevskyyHOBBY

a year ago

that's actually a good question, I was trying to deploy this thing and I am not much of a docker user


a year ago

it not being there is likely a good indicator that you probably don't want to copy it in


oleggulevskyyHOBBY

a year ago

and indeed, removing it removed the trouble.. 🙂


oleggulevskyyHOBBY

a year ago

thank you @Brody !


a year ago

no problem!


Docker image failes to copy `.git` directory - Railway Help Station