Why can't I copy my .git folder into my docker container Why can't I copy my .git folder into my docker container docker docker

Why can't I copy my .git folder into my docker container


You copied the contents of the .git folder into the /dist directory, not the .git folder itself. If you want to copy the folder, specify the target as the folder you want to create:

COPY .git/ ./.git/