Optimising Docker Layers for Better Caching with Nix
grahamc.com
grahamc.com
You could instead look at the dependency graph of several nix docker builds and increase the cache reuse even more from that.
"Where before you wouldn’t bother trying to have your application and database images share layers, with Nix the layer sharing is completely automatic."
The "old" way of building Docker images with Nix also provided some of these benefits, but for quick builds often ended up being slower due to the dependency on qemu. This is an awesome improvement on that!
I'd recommend people building & deploying a lot of Docker images (especially in languages with many dependencies on native libraries and such, which can be tricky to get right but which Nix mostly just handles for you) to see if building images with Nix could improve your workflow!
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y mysql phphttps://www.infoq.com/articles/configuration-management-with...
I also gave a talk about why I'm excited about Nix:
services.mattermost.enable = true;
and then running # nixos-rebuild switch
to have a mattermost instance running.