nix2container
nix2container is a free, open-source Nix library for building container images with a daemonless method.
What nix2container is
nix2container is a free, open-source Nix library for building container images with a daemonless method. It avoids writing tarballs to the Nix store and can skip layers that have already been pushed, so those layers do not need rebuilding. Dedicated layers can separate dependencies, allowing unchanged layers to avoid new builds or pushes. Image configuration follows the OCI image specification, and examples show loading images into Docker and Podman. Base images may be pulled from a registry by digest or provided through a manifest file. When creating tar layers, file permissions can be assigned without storing those permissions in the Nix store. Documentation covers registry authentication for Nix daemon builds using Docker credentials and a Skopeo auth file. Image pulls default tlsVerify to true. Linux is the listed platform, with the getting-started example selecting x86_64-linux. The repository uses the Apache License 2.0. Commercial support covers customizations, optimizations, guidance, and bug fixes.
Good
- Daemonless container image builds
- Reuses already pushed layers
- OCI image configuration
- Docker and Podman loading examples
- Free open-source Apache 2.0 project
Watch out
- Linux is the listed platform
- Container tests cannot run in Nix sandbox
- Registry authentication requires configuration
Who it suits
nix2container suits Linux users building OCI-compatible images with Nix, especially when daemonless builds and reusable layers matter. It is also relevant to teams needing Docker or Podman loading and registry-based base images.
Verdict
nix2container focuses on Nix-based image creation while reducing repeated layer work. Its Linux scope and documented sandbox testing limitation are important considerations.
Plans and prices
From nix2container's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Free | Free | Open-source Nix library |
The facts
Each one read from nix2container's own pages, with the date it was checked.
What it does
- Architecture
- The getting-started example selects the x86_64-linux system.checked 4 Oct 2026
- Base images
- Can pull base images from a container registry by digest or from a supplied manifest file.checked 4 Oct 2026
- Image formats
- The image configuration follows the OCI image specification.checked 4 Oct 2026
- Image loading
- Examples show loading images into Docker and Podman.checked 4 Oct 2026
- Layer caching
- Dedicated layers can isolate dependencies so unchanged layers need not be rebuilt or pushed.checked 4 Oct 2026
- Layer reuse
- Can skip already pushed layers without rebuilding them.checked 4 Oct 2026
- License
- The repository includes the Apache License, Version 2.0.checked 4 Oct 2026
- Permissions
- File permissions can be set when a tar layer is created without writing those permissions to the Nix store.checked 4 Oct 2026
- Purpose
- Builds container images with Nix without writing tarballs to the Nix store.checked 4 Oct 2026
- Registry authentication
- The documentation describes configuring registry authentication for Nix daemon builds using Docker credentials and a Skopeo auth file.checked 4 Oct 2026
- Security setting
- Image-pull functions default tlsVerify to true.checked 4 Oct 2026
- Support
- Commercial support is available for customizations, image optimizations, best-practices guidance, and bug fixes by contacting the maintainer.checked 4 Oct 2026
- Testing limitation
- The project documentation says its container tests do not run in the Nix sandbox because running a container there is currently not possible.checked 4 Oct 2026
Alternatives to nix2container
- 1

Garden
Free planOpen sourceWebAPILinuxmacOS8.3From $50 a month - 2

AWS CodeBuild
Free planWebAPILinuxmacOS7.9From $0.01 a month - 3

Amazon EC2
Free planAndroidiOSWebAPI7.6Free plan - 4
Source-to-Image
Free planOpen sourceLinuxmacOSSelf-hostedWindows7.2Free plan - 5
Dagger
Free planWebLinuxmacOSSelf-hosted7.1From $50 a month - 6
BuildKit
Free planAPILinuxmacOSSelf-hosted6.8Free plan
