DEV Community

Discussion on: Announcing docker-image-size-limit: keep an eye on your docker image size

Collapse
 
defman profile image
Sergey Kislyakov • Edited

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)?

Collapse
 
sobolevn profile image
Nikita Sobolev

Thanks for your suggestions.

  1. It will inspect not only your image size, but all the underlying images as well
  2. apk has --no-cache, so it won't store any cache
  3. It was some pretty html/pdf reports generator and all the binary tools that are required for this task