<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/dovpfwj8p" -->

---
title: Docker Image BEST Practices - From 1.2GB to 10MB | daily.dev
description: Discussion about &quot;Docker Image BEST Practices - From 1.2GB to 10MB&quot; on daily.dev - join the developer community
canonical: https://daily.dev/posts/dovpfwj8p
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Docker Image BEST Practices - From 1.2GB to 10MB | daily.dev
og:description: Discussion about &quot;Docker Image BEST Practices - From 1.2GB to 10MB&quot; on daily.dev - join the developer community
og:url: https://daily.dev/posts/dovpfwj8p
og:image: https://api.daily.dev/og/posts/DOvpfWj8P.png
og:image:alt: Post cover image
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.

# Docker Image BEST Practices - From 1.2GB to 10MB

**[Devs Tech](https://daily.dev/sources/devstech)** · [@serdarbuyukdereli](https://daily.dev/serdarbuyukdereli) · 846 upvotes · 9 comments

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=t779DVjCKCs>

## Community discussion

Top comments from developers on daily.dev.

**@nickvulkers** · 31 upvotes

> On mobile it’s unclear that this is a YouTube video…

**@mori\_kuldip** · 3 upvotes

> it's a grate knowledge sharing really appreciate.

**@taran95** · 3 upvotes

> Thank you for sharing.
> I'd also add 2 more best practices:
> - **always use a specific version of the base image**: this ensures consistency across builds.
> - **running the process as root user**: this may increase security risks, as an attacker gaining control would have unrestricted access. Creating a new user with restrictive permissions mitigates this risk.

**@patrikalienus** · 2 upvotes

> I thought I was gonna get to read something, but it was a youtube video. sigh.

**@aniket9** · 1 upvotes

> Really informative tips! I was surprised about how much of an image can be compressed.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/dovpfwj8p)

```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":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/dovpfwj8p","headline":"Docker Image BEST Practices - From 1.2GB to 10MB","text":"Shared: Docker Image BEST Practices - From 1.2GB to 10MB","url":"https://daily.dev/posts/dovpfwj8p","datePublished":"2024-12-26T18:41:02.181Z","dateModified":"2024-12-26T18:41:02.167Z","author":{"@type":"Person","name":"Serdarcan Buyukdereli","url":"https://daily.dev/serdarbuyukdereli","image":"https://media.daily.dev/image/upload/s--tTV8hAPq--/f_auto/v1778701721/avatars/avatar_Su5HqluAE4wLRb1naHjtv?_a=BAMAMiWQ0","description":"Senior Devops and Cloud Engineer\n","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":21380}},"image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":846},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":9}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/uxCDuTEBI"},"comment":[{"@type":"Comment","text":"On mobile it’s unclear that this is a YouTube video…","datePublished":"2024-12-28T00:35:31.928Z","url":"https://daily.dev/posts/DOvpfWj8P#c-0ylCW82vk","author":{"@type":"Person","name":"Nick Vulkers","url":"https://daily.dev/nickvulkers","image":"https://media.daily.dev/image/upload/s--UQ6qjG7e--/f_auto/v1734938708/avatars/avatar_X6DSiRyOCcrIgjWSt3MWp"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":31}},{"@type":"Comment","text":"it’s a grate knowledge sharing really appreciate.","datePublished":"2025-01-06T07:20:19.344Z","url":"https://daily.dev/posts/DOvpfWj8P#c-qLCF09KkS","author":{"@type":"Person","name":"Kuldip","url":"https://daily.dev/mori_kuldip","image":"https://lh3.googleusercontent.com/a-/AOh14GjX1imuO7FWneEfluAdzzqh7Eq_8ZSsVaPlusk6vcs=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Thank you for sharing.\nI’d also add 2 more best practices:\n\nalways use a specific version of the base image: this ensures consistency across builds.\nrunning the process as root user: this may increase security risks, as an attacker gaining control would have unrestricted access. Creating a new user with restrictive permissions mitigates this risk.","datePublished":"2025-01-19T10:31:17.167Z","url":"https://daily.dev/posts/DOvpfWj8P#c-2NRLp18EB","author":{"@type":"Person","name":"Taranjit Singh","url":"https://daily.dev/taran95","image":"https://media.daily.dev/image/upload/f_auto/v1607002316/avatars/8pqI3SLsH"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"I thought I was gonna get to read something, but it was a youtube video. sigh.","datePublished":"2025-01-30T09:40:55.769Z","url":"https://daily.dev/posts/DOvpfWj8P#c-SqAC6zt5K","author":{"@type":"Person","name":"Patrik Alienus","url":"https://daily.dev/patrikalienus","image":"https://avatars.githubusercontent.com/u/6548574?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Really informative tips! I was surprised about how much of an image can be compressed.","datePublished":"2025-01-17T19:20:17.811Z","url":"https://daily.dev/posts/DOvpfWj8P#c-57LvwagK9","author":{"@type":"Person","name":"aniket","url":"https://daily.dev/aniket9","image":"https://media.daily.dev/image/upload/s--pujmW0qN--/f_auto/v1732532057/avatars/avatar_Pw0Ddf6Zvr66IEnomw7lp"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/devstech","name":"Devs Tech"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Devs Tech","item":"https://daily.dev/squads/devstech"},{"@type":"ListItem","position":3,"name":"Docker Image BEST Practices - From 1.2GB to 10MB"}]}
```

