4 ms·
> I'm surprised you're able to build Docker images faster than Docker using their code/libraries? It's not a code/library problem. Knowing what Buildkit option
by jlhawn 4y ago
> I'm surprised you're able to build Docker images faster than Docker using their code/libraries?
It's not a code/library problem. Knowing what Buildkit options to use is the easy part. It's almost entirely a storage infrastructure and networking problem as it has huge implications on whether or not you'll be able to easily cache build layers.
- MuffinFlavored 4y ago> It's almost entirely a storage infrastructure and networking problem as it has huge implications on whether or not you'll be able to easily cache build layers. On a single machine, would NixOS/Bazel handle this better than Dockerfile/Docker/BuildKit?
- jacobwg 4y agoPotentially - if Nix or Bazel has already built the binaries, and just needs to construct an OCI-compliant image tarball with them, that can be quite quick, similar to a Dockerfile with only COPY instructions. Nix and Bazel can also give you deterministic / reproducible images that take more effort to construct with Dockerfiles. I've also seen people use Nix or Bazel inside their Dockerfile, like ultimately the build has to execute somewhere, be that inside or outside a Dockerfile.
- lewo 4y agoFYI, the nix2container [1] project (author here) aims to speedup the standard Nix container workflow (dockerTools.buildImage) by basically skipping the tarball step: it directly streams non already pushed layers. [1] https://github.com/nlewo/nix2container https://github.com/nlewo/nix2container