Hacker News new | past | comments | ask | show | jobs | submit login

Yeah but if I had the option of Docker or something nix based, why would I not choose Docker? Particularly as deploying to most Clouds is pretty easy if an app in already in a Docker Container.



You can easily build Docker images using Nix. Benefits: (1) reproducability, if you pin to a certain nixpkgs, you always get the same set of packages; (2) layers don't have to be full filesystem diffs; (3) the image only contains the computed closure. E.g. I produce Docker images an NLP program with Nix. The image only contains: glibc, tensorflow, my program, word embeddings, the model. No other system files or dependencies. Since the image build expression uses Nix expressions, I can also directly use the same models on my Linux workstation, Linux servers, macOS, etc. without Docker.

This is a good starting point:

https://grahamc.com/blog/nix-and-layered-docker-images


One advantage is that guix/nix only isolate dependencies. So, if I want two or more utilities to interact, I don’t need to bring in something like docker-compose or used network protocols, I just depend on both and write a script or something. This way, I can start with each service on its own container and then, as necessary, move two services into one container or whatever.

Also, nix/guix are somewhat lower-overhead ways to build a system for local development than containers.


Guix provides interoperability with Docker: the 'guix pack' command builds Docker images of applications, and 'guix system docker-image' builds images containing a complete system with services, etc.

So Guix gives you reproducibility, provenance tracking, and hackability, but you can still "speak Docker".


Combine it and use nix for building docker containers. :)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: