| ▲ | klysm 12 hours ago | ||||||||||||||||
The layers are tar files, I’m confused what behavior you actually want that isn’t supported. | |||||||||||||||||
| ▲ | cyberax 12 hours ago | parent [-] | ||||||||||||||||
The original Docker (and the current Podman) created each layer as an overlay filesystem. So each layer was essentially an ephemeral container. If a build failed, you could actually just run the last successful layer with a shell and see what's wrong. More importantly, the layers were represented as directories on the host system. So when you wanted to run something in the final container, Docker just needed to reassemble it. Buildkit has broken all of it. Now building is done, essentially, in a separate system, the "docker buildx" command talks with it over a socket. It transmits the context, and gets the result back as an OCI image that it then needs to unpack. This is an entirely useless step. It also breaks caching all the time. If you build two images that differ only slightly, the host still gets two full OCI artifacts, even if two containers share most of the layers. It looks like their Bazel infrastructure optimized it by moving caching down to the file level. | |||||||||||||||||
| |||||||||||||||||