4 ms·
One thing in the blog that is not true is that you can only inherit from a single layer. You can use multi-stage builds to grab & blend layers: https://docs.do
by cetra3 5y ago
One thing in the blog that is not true is that you can only inherit from a single layer. You can use multi-stage builds to grab & blend layers: https://docs.docker.com/develop/develop-images/multistage-build/ https://docs.docker.com/develop/develop-images/multistage-bu.... It is not as powerful as nix, granted, but it is possible.
- flyinprogrammer 5y agoExcept that multi-stage builds are deceptively not grabbing or blending layers - it's simply letting you copy files from a layer. And that is a big miss. Being able to describe "now append this layer and all, but only, its file changes from this previous layer" would be pretty epic.
- cbrewster 5y agoWhile you can copy files from different stages, I wouldn't consider this to be the same thing as composing two base images together. Like the example in the post, you can't take the Rust and NodeJS images and tell Docker to magically merge them. You can copy binaries & libraries from one to the other but that seems extremely tedious and error prone. Whereas Nix makes it rather trivial to compose together the packages you need (eg Rust, NodeJS) in your environment.