<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk" -->

---
title: A Small Tip to Reduce Your Docker Images Size by Almost Half
description: Docker image size went from 400MB to 170MB, less than half! The problem is that this does not work! The image size is the same as if we did not remove...
canonical: https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Small Tip to Reduce Your Docker Images Size by Almost Half | daily.dev
og:description: Docker image size went from 400MB to 170MB, less than half! The problem is that this does not work! The image size is the same as if we did not remove...
og:url: https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk
og:image: https://api.daily.dev/og/posts/k6zm-6yK_.png
og:image:alt: A Small Tip to Reduce Your Docker Images Size by Almost Half
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Small Tip to Reduce Your Docker Images Size by Almost Half

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 3 min read · 12 upvotes · 0 comments

## Summary

Docker image size went from 400MB to 170MB, less than half! The problem is that this does not work! The image size is the same as if we did not remove build-base . Let's discover why. The size can only increase or stay the same from one layer to another. Don’t give up, we got this!

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://betterprogramming.pub/small-tip-to-shrink-your-docker-images-size-33a58e71783a?source=rss----d0b105d10f0a--ruby>

---

Tags: [#docker](https://daily.dev/tags/docker)

[View this post on daily.dev](https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Small Tip to Reduce Your Docker Images Size by Almost Half","url":"https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk"},"datePublished":"2022-05-13T12:29:45.179Z","dateModified":"2022-05-13T12:29:45.180Z","description":"Docker image size went from 400MB to 170MB, less than half! The problem is that this does not work! The image size is the same as if we did not remove...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/75f6e2d0c525438129dd1a62834da71a","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/75f6e2d0c525438129dd1a62834da71a","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-small-tip-to-reduce-your-docker-images-size-by-almost-half-k6zm-6yk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"docker","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"A Small Tip to Reduce Your Docker Images Size by Almost Half"}]}
```

