panda-re / panda

Platform for Architecture-Neutral Dynamic Analysis
https://panda.re
Other
2.45k stars 475 forks source link

Add back .git folder to dockerfile build stage #1490

Closed lacraig2 closed 4 months ago

lacraig2 commented 4 months ago

Required for some context and version information.

AndrewFasano commented 4 months ago

I'm not opposed to merging this, but would it be possible to avoid keeping the full git history around and still preserve the version number. At least on my machine the .git directory is nearly 900MB which seems like a lot to just get a version number.

lacraig2 commented 4 months ago

@AndrewFasano this change does not actually impact the size of the final panda container.

It may not even impact the size of intermediate stages given how docker stages function.

lacraig2 commented 4 months ago

Just to clarify: we're not distributing the .git folder in the final image. It's just there as we build.