What does HackerNews think of buildkit?
concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
There is a lot of ongoing work in that area in the buildkit ecosystem. For example Netflix has a distributed buildkit farm, which I believe relies on containerd storage backends to share cache data. There are also integrations to run buildkit nodes on a kubernetes cluster.
Dagger itself is obviously quite new, but buildkit itself is very mature, thanks to its integration with 'docker build'.
OCI images are not quite as bad as they used to be. Linear caching is no longer baked directly into the image format, instead it's an assumption that has been carried forward by Dockerfiles and docker build.
Docker folks are working on at least the docker build part in buildkit[1]. In the meantime though I prefer Cloud Native Buildpacks, which are able to perform layer rebasing as an update operation.
Disclosure: I have previously worked on buildpacks technology for Pivotal, now VMware.
[0] https://docs.google.com/document/d/1M2PJ_h6GzviUNHMPt7x-5POU...
See https://github.com/moby/buildkit. You can enable it today with `DOCKER_BUILDKIT=1 docker build ...`
There is also buildx which is an experimental tool to replace `docker build` with a new CLI: https://github.com/docker/buildx
Honestly after years of stagnation, the most exciting work on container building is now coming out of Docker. Buildkit is amazing, a real hidden gem.
I don't know if the Dockerfile format is really suitable for this, but you can now build your own format and Docker can just build it.
Basically buldkit breaks things down into a frontend format (like Dockerfile) and a frontend parser which gets specified as an image at the top of your file (`#syntax=`), the parser converts the frontend format into an intermediary language (called llb), buildkit takes the llb and passes it to a backend worker.
This all happens behind the scenes with `DOCKER_BUILDKIT=1 docker build -t myImage .`
Docker actually ships new Dockerfile features that aren't tied to a docker version this way.
Actually there are a number of new Dockerfile features that might get you what you need, even if the format isn't all that great, at least it's relatively natural to reason about. Things like cache mounts, secrets, mounting (not copying) images into a build stage's "RUN" directive, lots of great stuff.
This is all officially supported stuff.
Here's a demo of "docker build" building from a buildpack spec instead of Dockerfile: https://github.com/tonistiigi/buildkit-pack
- buildkit - https://github.com/moby/buildkit - official Docker docs - https://docs.docker.com/develop/develop-images/build_enhance... - buildkit Dockerfile docs - https://github.com/moby/buildkit/blob/master/frontend/docker...
If Kaniko authors are reading this: have you considered buildkit and, if not, would you be open to contributions based on it?
My understanding is that the official 'docker build' itself is based on Buildkit.