I have a maven project that I am building and running inside Docker container. My maven build needs to have an access to my project's GIT repository for some commit info extraction so I need to temporarily include my repository inside an image.
The problem is that my repository weights more than 600MB and it makes my image unnecessarily huge. I cannot add my repo to an image, perform some action and then remove it later. Well, I can. But it will not save any space due to nature of Docker images. Any ideas on how to deal with this?