Hacker GitHub

← All repos

nlewo/nix2container

View on GitHub ↗ ★ 941 Go

An archive-less dockerTools.buildImage implementation

16 mentions on Hacker News by 7 people: 0 stories, 16 comments · first 2022-04-19 · latest 2025-12-25

Mentions per year 16 mentions · busiest year 2023 (6)
20082026
  1. I think this is really close to the way nix2container works ( https://github.com/nlewo/nix2container ). nix2container generates metadata at build time and streams the required data at runtime. At build time, it generates a JSON file…
  2. …2: https://nix.dev/manual/nix/2.30/command-ref/new-cli/nix3-cop... 3: https://github.com/nlewo/nix2container 4: https://guix.gnu.org/blog/2020/grafts-continued/
  3. …a subset of the dependencies required by your image. An example is provided in this section: https://github.com/nlewo/nix2container?tab=readme-ov-file#is... For instance, if your images use bash, you can explicitly create a layer…
    comment by lewo · 2025-06-07 · in Why We're Moving on from Nix
  4. …comes from them. And I actually landed a minor contribution to nix2container, which was nice to do: https://github.com/nlewo/nix2container/pull/77
    comment by mikepurvis · 2025-06-03 · in How I like to install NixOS (declaratively)
  5. I mean if we're going full pie in the sky, fully declarative containers exist today: https://github.com/nlewo/nix2container#nix2container Dagger looks nifty, but it's too bad that it's still basically an imperative "start from thing, do…
    comment by mikepurvis · 2025-03-27 · in Dagger: A shell for the container age
  6. No discussion about Nix-built containers is complete without mentioning nix2container: https://github.com/nlewo/nix2container It is truly magical for handling large, multi-layered containers. Instead of building the container archives…
  7. …stream directly from the nix store into remote docker registries with something like nix2container! https://github.com/nlewo/nix2container
  8. Example of an actually-declarative container definition: https://github.com/nlewo/nix2container/blob/master/examples/... (disclosure: I have contributed to that repo)
    comment by mikepurvis · 2023-08-31 · in Docker Is Four Things
  9. …that contain platform-specific binaries (such as esbuild). - Container images are built with https://github.com/nlewo/nix2container instead of Nix's built-in docker tools, because nix2container allows configuration of layers and thus makes…
    comment by dindresto · 2023-05-19 · in Way to get NVM working in CI/CD systems
  10. …to assemble them, which can be a huge time savings for incremental building of these things: https://github.com/nlewo/nix2container
    comment by mikepurvis · 2023-03-30 · in Building Containers with Nix and Gitlab CI
  11. …images. [1] https://hercules-ci.com/ [2] https://grahamc.com/blog/nix-and-layered-docker-images [3] https://github.com/nlewo/nix2container/blob/85670cab354f7df6...
  12. …by basically skipping the tarball step: it directly streams non already pushed layers. [1] https://github.com/nlewo/nix2container
  13. …such as crane https://github.com/ipetkov/crane ? And regarding OCI images, i built nix2container ( https://github.com/nlewo/nix2container ) to speed up image build and push times.
  14. For a more modern iteration of that idea, check out https://github.com/nlewo/nix2container It has all the benefits of OP but produces the images much faster, and with less on-disk usage.
  15. …removing that dependency? It shouldn't be necessary to create an OCI compliant image with Nix. [1]: https://github.com/nlewo/nix2container
  16. With https://github.com/nlewo/nix2container , I'm trying to make a more standalone tool. Basically, a Go binary takes a reference graph and produces a JSON file describing a container image. This JSON file is then ingested by a Skopeo fork…