Hacker News new | ask | show | jobs
by gravypod 2412 days ago
I wish there was something like Bazel, Buck, Pants, or Please built on top of docker/crio.

The docker build cache, and dockerizarion of tools, has made building, testing, and deploying software so much simpler. Unfortunately the next step in build systems (in my opinion) still has the mentality that people want to have mutable state on their host systems.

I hope someone extends BuildKit into a system like Bazel. All rules can be executed in containers, all software and deps can be managed in build contexts, you automatically get distributed test runners/builds/cache by talking to multiple docker daemons, etc.

3 comments

The docker build cache alone feels like magic for long (from scratch) builds. It feels tedious breaking out individual steps but I’ve yet to regret the extra effort.
In other contexts, Cow snapshots such as those provided by LVM or ZFS etc can provide similar effect by naming the snapshot after the hash of the code to execute to build it
Please go to NixOS.org. The Nix package manager, Nixpkgs package set, and NixOS distribution is exactly what you want.
Nix, similar to Bazel, Buck, Pants, and Please are very close to what I'd like but doesn't cover the exact functionality I'm looking for.
What functionality are you missing?
Being built on standardized container technology. Also support for Windows builds would be nice.
Well, if one of your criteria is to build in docker you should use a docker. I mean if one of my requirement was that program should be written in Python I would write it in Python.

If you need to create Docker or OCI image you can use nixpkgs functions[1][2]

As for Windows, yeah, it's not natively supported, I see there's an issue opened, but no idea when a support would be added.

There's also this[3] not sure if suitable for what you need. My understanding is that it allows building for Windows targets on Linux.

[1] https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools

[2] https://nixos.org/nixpkgs/manual/#sec-pkgs-ociTools

[3] https://github.com/pololu/nixcrpkgs

This is kind of what skaffold does. Check it out if you haven't.
I just took a look at Skaffold. I don't think this is what I want. Skaffold does not look like the right solution of a monorepo with code gen, dependencies, and complex build processes. It looks like it's the right tool for a bunch of folders containing Dockerfiles and build contexts.