Most of your image size would come from the underlying OS (Ubuntu, Debian, Alpine), and Docker handles it pretty well by re-using OS layers when possible (push, pull, building, etc.). So what's the idea of checking your image size?
Btw, I wonder what dependencies added 1.3GB to your images. I guess some of them brought some dev dependencies that could be removed after all dependencies has been installed. Also, I usually see a line in Dockerfiles that removes apt cache. Maybe it makes sense for the Alpine package manager (apk)?
Most of your image size would come from the underlying OS (Ubuntu, Debian, Alpine), and Docker handles it pretty well by re-using OS layers when possible (push, pull, building, etc.). So what's the idea of checking your image size?
Btw, I wonder what dependencies added 1.3GB to your images. I guess some of them brought some dev dependencies that could be removed after all dependencies has been installed. Also, I usually see a line in Dockerfiles that removes apt cache. Maybe it makes sense for the Alpine package manager (apk)?
Thanks for your suggestions.
apk
has--no-cache
, so it won't store any cache