<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks" -->

---
title: The Nix Fix for Docker’s Biggest Problem | daily.dev
description: A video walks through building container images with Nix flakes instead of Dockerfiles, arguing that Docker's biggest weakness is mutable tags and unpinned...
canonical: https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Nix Fix for Docker’s Biggest Problem | daily.dev
og:description: A video walks through building container images with Nix flakes instead of Dockerfiles, arguing that Docker's biggest weakness is mutable tags and unpinned...
og:url: https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks
og:image: https://api.daily.dev/og/posts/vGOjNFiks.png
og:image:alt: The Nix Fix for Docker’s Biggest Problem
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.

# The Nix Fix for Docker’s Biggest Problem

**[DevOps Toolbox](https://daily.dev/sources/devopstoolbox)** · [@dotb](https://daily.dev/dotb) · 9 min read · 5 upvotes · 0 comments

## Summary

A video walks through building container images with Nix flakes instead of Dockerfiles, arguing that Docker's biggest weakness is mutable tags and unpinned base layers that undermine reproducibility. It shows converting a simple Go Dockerfile into a Nix flake that pins dependencies via flake.lock, cross-builds for x86 and arm64, and uses dockerTools to produce an OCI image without a traditional base image. The creator also demonstrates Nix develop as a replacement for ad-hoc docker run dev shells, while conceding Nix's syntax is harder and recommending Dockerfiles remain the right choice for small, simple apps. A sponsored segment covers Moonshot AI's Kimi K3 model, a 2.8 trillion parameter open-weight model with a 1M token context window aimed at agentic coding.

## Full article

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

## Questions this post answers

### How do I build a reproducible Docker image using Nix instead of a Dockerfile?

Write a Nix flake that pins nixpkgs via flake.lock, define target systems like x86_64-linux and aarch64-linux, build the Go binary with buildGoModule, then use dockerTools.buildImage to package a filesystem containing just the compiled binary into an OCI image, avoiding a mutable base image entirely.

_Developers weighing Nix versus Dockerfile builds can track deep-dive comparisons like this on daily.dev._

### Why are Docker image tags unreliable for guaranteeing reproducibility?

Tags are mutable pointers that can be deleted, overwritten, or changed at any time, so pulling an image by tag like latest does not guarantee the same content across pulls. A pushed update with a bug or malicious code under the same tag will be served on the next pull; only the full SHA256 digest actually locks a specific image, and it is rarely used in practice.

_Teams hardening their deployment pipelines against tag drift can follow ongoing Docker practices on daily.dev._

### What is Kimi K3 and what does it cost to use via API?

Kimi K3 is Moonshot AI's flagship open-weight model with 2.8 trillion parameters, the first open model in the 3 trillion parameter class, featuring native vision support and a 1 million token context window optimized for agentic coding and long-running tasks. API pricing is $3 per million input tokens and $15 per million output tokens, with cached input dropping to 30 cents per million.

_Developers evaluating open-weight coding models against cost can follow releases like this on daily.dev._

## Similar posts on daily.dev

- [Docker versus Nix: The quest for true reproducibility](https://daily.dev/posts/docker-versus-nix-the-quest-for-true-reproducibility-r1crtumla) · The New Stack · 1 upvotes · 0 comments
- [Why I love NixOS](https://daily.dev/posts/why-i-love-nixos-on18fcwiv) · Hacker News · 3 upvotes · 0 comments
- [Building \(systems\) software with Nix](https://daily.dev/posts/building-systems-software-with-nix-jbw3o8thj) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#containers](https://daily.dev/tags/containers), [#docker](https://daily.dev/tags/docker), [#golang](https://daily.dev/tags/golang), [#reproducible-builds](https://daily.dev/tags/reproducible-builds)

[View this post on daily.dev](https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks)

```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":"The Nix Fix for Docker’s Biggest Problem","url":"https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks"},"datePublished":"2026-09-18T16:55:30.426Z","dateModified":"2026-10-15T02:22:46.573Z","description":"A video walks through building container images with Nix flakes instead of Dockerfiles, arguing that Docker's biggest weakness is mutable tags and unpinned...","image":"https://i.ytimg.com/vi/iGHmNe9JwwY/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/iGHmNe9JwwY/sddefault.jpg","isAccessibleForFree":true,"articleSection":"DevOps Toolbox","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":"Person","name":"Omer Hamerman","url":"https://daily.dev/dotb","image":"https://lh3.googleusercontent.com/a/ACg8ocJB2-93wM4nOWbMdxHRvofAp50GzE0fnzvUC9Ce5BPaZEW1d84=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":30}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"containers,docker,golang,reproducible-builds","timeRequired":"PT9M","video":{"@type":"VideoObject","name":"The Nix Fix for Docker’s Biggest Problem","description":"A video walks through building container images with Nix flakes instead of Dockerfiles, arguing that Docker's biggest weakness is mutable tags and unpinned...","thumbnailUrl":"https://i.ytimg.com/vi/iGHmNe9JwwY/sddefault.jpg","uploadDate":"2026-09-18T16:55:30.426Z","duration":"PT9M","url":"https://api.daily.dev/r/vGOjNFiks","embedUrl":"https://www.youtube.com/embed/iGHmNe9JwwY"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DevOps Toolbox","item":"https://daily.dev/sources/devopstoolbox"},{"@type":"ListItem","position":3,"name":"The Nix Fix for Docker’s Biggest Problem"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-nix-fix-for-docker-s-biggest-problem-vgojnfiks#faq","mainEntity":[{"@type":"Question","name":"How do I build a reproducible Docker image using Nix instead of a Dockerfile?","acceptedAnswer":{"@type":"Answer","text":"Write a Nix flake that pins nixpkgs via flake.lock, define target systems like x86_64-linux and aarch64-linux, build the Go binary with buildGoModule, then use dockerTools.buildImage to package a filesystem containing just the compiled binary into an OCI image, avoiding a mutable base image entirely. Developers weighing Nix versus Dockerfile builds can track deep-dive comparisons like this on daily.dev."}},{"@type":"Question","name":"Why are Docker image tags unreliable for guaranteeing reproducibility?","acceptedAnswer":{"@type":"Answer","text":"Tags are mutable pointers that can be deleted, overwritten, or changed at any time, so pulling an image by tag like latest does not guarantee the same content across pulls. A pushed update with a bug or malicious code under the same tag will be served on the next pull; only the full SHA256 digest actually locks a specific image, and it is rarely used in practice. Teams hardening their deployment pipelines against tag drift can follow ongoing Docker practices on daily.dev."}},{"@type":"Question","name":"What is Kimi K3 and what does it cost to use via API?","acceptedAnswer":{"@type":"Answer","text":"Kimi K3 is Moonshot AI's flagship open-weight model with 2.8 trillion parameters, the first open model in the 3 trillion parameter class, featuring native vision support and a 1 million token context window optimized for agentic coding and long-running tasks. API pricing is $3 per million input tokens and $15 per million output tokens, with cached input dropping to 30 cents per million. Developers evaluating open-weight coding models against cost can follow releases like this on daily.dev."}}]}
```

