Docker and Nix (DockerCon 2023)
HTML-код
- Опубликовано: 11 сен 2024
- Learn how to work with the Nix package ecosystem from your Docker application. We'll contrast Nix with other ecosystems like Debian and Alpine and highlight some of the unique properties that make it a compelling alternative. Does your team struggle with development and production environments that are not in sync? For example, are local environments built using Brew, while production Docker images are built using Alpine? We explain how to build projects where the development, CI, and production environments are built from the exact same set of packages. We'll provide a set of sample Docker applications that illustrate these patterns (including applications written using Python, Golang, Node.js, Java, Ruby, Rust, and Clojure). We'll also provide public GitHub repos so that you can experiment using your own Docker Desktops. Watch and learn why Docker and Nix are such a great match.
Presentation: Docker and Nix
Speakers: Thomas Bereknyei, Engineer, Flox
Jim Clark, Lead Engineer, Docker
Resources:
Highlights from DockerCon 2023: New Docker Local, Cloud, and AI/ML Innovations - www.docker.com...
Get started with Docker - www.docker.com...
What are containers? www.docker.com...
Try Docker Desktop www.docker.com...
Docker 101 Tutorial www.docker.com...
Join the conversation!
LinkedIn → dockr.ly/LinkedIn
Twitter → dockr.ly/Twitter
Facebook → dockr.ly/Facebook
Instagram → dockr.ly/Insta...
ABOUT DOCKER: Docker provides a suite of development tools, services, trusted content, and automations, used individually or together, to accelerate the delivery of secure applications.
#docker #nix #softwaredevelopment
I think radically building the entire image in Nix and only streaming the result may magically fix the cache cost incurred on update (because nix already knows how to) and also results in single-layer minimal images. Single-layer is just more efficient. Oh, and also it keeps all things declarative (the SBOM output can be declarative, as opposed as accidentally being back to imperative because of … well that’s the nature of the copy command in Dockerfiles
Excellent talk nonetheless. Even if the end-result doesn’t yet look optimal to me, one thing this does in a way that would otherwise not happen, is to highlight the difference in paradigm/mindset between the two ecosystems. It was highly enlightening to me in that way.
this is what I was looking for, amazing.
Much love brother!
32:08 wow, interesting to see that python app comparison > size is more on nix w.r.t debian+layers
Neat. Where can I find a working example of the “shim” file for python?
The shim is project agnostic. To use it with a python application you simply need to figure out how to build\package it with nix. The shim simply copies what you built with nix into a single layer container image
that's right! The shim should work for any nix project
Maybe I missed something, but this embrace looks more like the MS way of doing things in the 90s.. Is it truly a strategic partnership? I don't clearly see what docker brings to the table, I only see docker pre-emptively adopting Nix's philosophy [storing declaratives, not images] in an effort to improve container management and also, before Nix eats docker's lunch???
Docker brings here runtime containerisation and also image management. While Nix brings creating environments.
You are 100% right, docker is not needed when nix is done right.
@@hera9191Precisely. Which is why I’d say DON’T use the shim. Don’t reimplement nix store in docker’s layer system. Just build the entire image in nix and stream it into a single layer for podman, docker or whatever target container runtime you need
I worked with MS in the 90s and have no idea what you're talking about. They had nothing like this.
There is more to running containers than the build process, so I wouldn't recommend throwing out the shim too quickly.
@@mabainter i was referring to MS way of dealing with competing technologies born in the 90’. Triple-E, embrace, extend and extinguish.
Nix > AI, you heared it here first
I hate both equally