Does Docker image size matter? The answer I usually hear is “yes”. The logical question that follows is “why?”.
I’ve heard the following two answers too often for my liking:
- A smaller image takes less disk space.
- A large image is difficult to upload. It takes a long time.
Although both these statements sound like they make sense, neither is generally true.
There are some other legitimate reasons why it’s desirable to have smaller Docker images, like reducing the attack surface. But in this article, I want to address the urban legends mentioned above.