DEV Community

Cover image for A COMPLETE guide on how to make Docker images even smaller
Symflower
Symflower

Posted on • Edited on • Originally published at symflower.com

4 2

A COMPLETE guide on how to make Docker images even smaller

"Small container images"

These days everything is either moving or already running in containers when it comes to software infrastructure. The very first container of Symflower was not for our product, some service or our website, it was our continuous integration (CI). Starting off with an almost tiny 100MB, we noticed that our baby Docker container image has grown to a full-size monster with a whopping 6.2GB. Here is a step-by-step guide on how you can reduce the size of your container images and how we slimmed down our oversized monster image.

{{< info-block >}}
Please note that this article is not just a bunch of tips, but is really meant as a complete guide with debugging information on how to slim down your container images. While only Docker is mentioned, these steps and techniques are applicable to most solutions. In any case, if you find a step that we missed towards a smaller image size: tell us! We will extend the article so the next person benefits from your feedback.
{{</ info-block >}}

{{< table-of-contents >}}

As with everything in the world of software development and infrastructure, we can rely on best practices that others have already established by most likely wading through hours of painful research.

For a comprehensive guide to reducing the size of Docker images, continue reading on Symflower's blog:
A COMPLETE guide on how to make Docker images even smaller

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay