Optimising Docker Layers for Better Caching with Nix
1–10 of 14 posts
Re: Optimising Docker Layers for Better Caching with Nix
#2The "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!
Re: Optimising Docker Layers for Better Caching with Nix
#3Re: Optimising Docker Layers for Better Caching with Nix
#4Re: Optimising Docker Layers for Better Caching with Nix
#5You could instead look at the dependency graph of several nix docker builds and increase the cache reuse even more from that.
Re: Optimising Docker Layers for Better Caching with Nix
#6Re: Optimising Docker Layers for Better Caching with Nix
#7 FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y mysql phpRe: Optimising Docker Layers for Better Caching with Nix
#8Nix and Docker integration is almost optimal now, no other tooling provides that type of functionality
Re: Optimising Docker Layers for Better Caching with Nix
#9Neat. It seems like Nix could become the preferred way to build Docker images, if it's made a bit more user friendly. It's hard to beat the simplicity of FROM ubuntu:latest RUN apt-get update RUN apt-get install -y mysql php
https://www.infoq.com/articles/configuration-management-with...
I also gave a talk about why I'm excited about Nix:
Re: Optimising Docker Layers for Better Caching with Nix
#10Neat. It seems like Nix could become the preferred way to build Docker images, if it's made a bit more user friendly. It's hard to beat the simplicity of FROM ubuntu:latest RUN apt-get update RUN apt-get install -y mysql php
services.mattermost.enable = true;
and then running # nixos-rebuild switch
to have a mattermost instance running.