Nixery - Serve container images straight from Nix


Happy to announce that I finally published the source of Nixery at github.com/google/nixery yesterday!

Nixery is a tiny service that implements Docker’s registry protocol for serving images - but instead of serving pre-built images it creates them on-demand from a set of packages specified in the image name.

For example, pulling an image called bash/htop/curl from Nixery gives you an image with, well, those three programs. This sprung out of my previous idea for a Nix controller in Kubernetes because it turns out to be quite powerful, despite the simplicity.

Future plans for this are focused on two main areas:

  1. Implementing support for private Nix repositories. See this issue for more background information.
  2. Support deployments inside of Kubernetes clusters to let Nixery become a part of a cluster’s deployment infrastructure. See this issue for more background!

Feel free to play around with the demo instance (though be aware that it’s a tiny setup and won’t perform particularly well if people hammer it), suggest features, retweet the announcement tweet (or make your own!) and so on.

If I manage to tackle the two things mentioned above in time, I’m planning to talk about this at NixCon.

PS: If someone wants to contribute a more interesting logo, please do!

11 Likes

So random question since a url can create an image. When creating a dockerfile, can we “FROM url” to a url with nixery? Using nix as a base image.

Yes, you should be able to do that. Note that if you want to have Nix available inside of that image (to install additional tools from within your Dockerfile), things might get a little complicated. For other stuff (adding data etc.) it should be no problem at all!

Thanks. Yeah my plan was to add additional data to the images. In my opinion the key to nix adoption is that people don’t know they are using nix. This is a great step in that direction, thanks for the work!

This has now been posted to Hacker News

1 Like