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/.
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
Re:Will Nix Overtake Docker?
by jokethrowaway on Tuesday November 30, 2021 @04:10PM
(#29397498)
That's because nix is not a docker alternative.
I'd love a nix-like docker alternative to be fair but that'd be a massive undertaking.
Re:Will Nix Overtake Docker?
by throwaway894345 on Tuesday November 30, 2021 @04:34PM
(#29397772)
What is a "nix-like docker alternative"? Is that "using Nix to build container images"? Because Nix already does that.
I have never used nix, but from the article the author only concentrated on the fact that docker and nix create reproducible environments, and completely misses the other benefits of containers.
As a devops guy if someone hands me a nix project, how do I deploy that so it is highly available and scales by itself?
With containers I just put it in kubernetes.