adept / full-fledged-hledger

Tutorial on Hledger setup with multi-year files, multi-source imports and a range of auto-generated reports
https://github.com/adept/full-fledged-hledger/wiki
BSD 3-Clause "New" or "Revised" License
370 stars 31 forks source link

Reduce Docker image size by removing Pantry cache #20

Closed adamantike closed 3 years ago

adamantike commented 3 years ago

Using dive, I found that almost half the size of the Docker image is actually the Pantry cache. By removing the Pantry folder, the image size goes from 3.3GiB to 1.8GiB!

REPOSITORY              TAG        IMAGE ID        CREATED       SIZE
full-fledged-hledger    patched    90b49ff7942a    1 hour ago    1.82GB
full-fledged-hledger    master     b3e8bcb92ac8    1 hour ago    3.28GB

I'm not completely familiar with the Haskell toolchain, but if I understand correctly, removing this folder is harmless, and shouldn't affect the main purpose of the Docker image, which is just to run hledger* commands.

adept commented 3 years ago

Thank you! Indeed, cache in question should be mostly not needed, and I will assume that people who need it (cause they reword export.hs extensively) would be able to work around it being absent