5 ms·
Dive is a great tool for debugging this. I like image reduction work just because it gives me a chance to play with Dive: https://github.com/wagoodman/dive http
by SOLAR_FIELDS 3y ago
Dive is a great tool for debugging this. I like image reduction work just because it gives me a chance to play with Dive: https://github.com/wagoodman/dive https://github.com/wagoodman/dive
One easy low hanging fruit I see a LOT for ballooning image sizes is people including the kitchen sink SDK/CLI for their cloud provider (like AWS or GCP), when they really only need 1/100 of that. The full versions of both of these tools are several hundred mb each
- bloopernova 3y agoDo you have a link to a recommended guide to slimming down the cloud provider tools?
- bhupesh 3y agoCan vouch for dive, the final system tree was generated by dive (should have acknowledged it, my bad)
- gkfasdfasdf 3y agodive is amazing. One thing I realized by using the tool is that chmoding a file from an earlier layer results in that file (in it's entirety) getting added to the current layer. E.g. the below Dockerfile creates an alpine image that is around double the size of the original alpine image: FROM alpine RUN chmod -R a+rwx bin dev home lib media mnt opt root run sbin srv tmp usr var