# Docker Images : Part I - Reducing Image Size

DevFeed: [Docker Images : Part I - Reducing Image Size](<https://devfeed.tech/articles/docker-images-part-i-reducing-image-size-22156.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2020/02/docker-images-part1-reducing-image-size.html>)

Published: 2020-02-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [docker images](<https://devfeed.tech/topics/docker-images.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [C](<https://devfeed.tech/topics/c.md>), [Go](<https://devfeed.tech/topics/go.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [bazel](<https://devfeed.tech/topics/bazel.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [base-images](<https://devfeed.tech/tags/base-images.md>), [bazel](<https://devfeed.tech/tags/bazel.md>), [blog](<https://devfeed.tech/tags/blog.md>), [c](<https://devfeed.tech/tags/c.md>), [containers](<https://devfeed.tech/tags/containers.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-images](<https://devfeed.tech/tags/docker-images.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rust](<https://devfeed.tech/tags/rust.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

## AI overview

This tutorial explains techniques for reducing Docker image size, beginning with multi-stage builds and covering static versus dynamic linking and Alpine. It uses C and Go examples and introduces additional approaches such as common base images, stripping binaries, Bazel, Distroless, DockerSlim, and UPX, while noting that extreme reductions are not always appropriate.

## Source excerpt

Series Index Reducing Image Size Details Specific To Different Languages Going Farther To Reduce Image Size Introduction When getting started with containers, it's pretty easy to be shocked by the size of the images that we build. We're going to review a number of techniques to reduce image size, without sacrificing developers' and ops' convenience. In this first part, we will talk about multi-stage builds, because that's where anyone should start if they want to reduce the size of their images. We will also explain the differences between static and dynamic linking, as well as why we should care about that. This will be the occasion to introduce Alpine.