Re:Will Nix Overtake Docker?
by Nullabillity on Tuesday November 30, 2021 @08:35AM
(#29391898)
You can use Nix as a better docker build, see https://grahamc.com/blog/nix-and-layered-docker-images or https://nixery.dev/.
[ Parent
| on HN ]
Re:Will Nix Overtake Docker?
by throwaway894345 on Tuesday November 30, 2021 @10:07AM
(#29392887)
The dream is using something like Nix to not only reproducibly build a container image but also all of the infrastructure manifests which reference it. I _think_ this is achievable in Nix if you're willing to deal with all of the pain of actually using Nix; however, this would depend on pushing an image to a container registry as part of the Nix build and I'm pretty sure that violates Nix's idioms/conventions? I've certainly never heard of anyone building their entire infrastructure manifests this way.
Re:Will Nix Overtake Docker?
by Nullabillity on Tuesday November 30, 2021 @10:23AM
(#29393083)
> The dream is using something like Nix to not only reproducibly build a container image but also all of the infrastructure manifests which reference it. I _think_ this is achievable in Nix if you're willing to deal with all of the pain of actually using Nix;
We did that at an old job. Basically, Nix built images + K8s manifests + a script to push the images. Our CI job boiled down to `nix-build && ./result/push-images && kubectl apply -f ./result/manifests -R`. This is similar to how NixOS' nixos-rebuild boils down to `nix-build && ./result/activate`.
See https://dagger.io, the next gen tool by the creators of docker that does this.
CUE + BuildKit