Hacker News new | ask | show | jobs
by brettproctor 1915 days ago
I could see this being really useful for the team I'm on, specifically for doing docker builds of rust binaries. The build always has to start from scratch, and being able to easily used a remote high power machine could really speed this up. Thanks for sharing!
4 comments

Builds don't "have" to start from scratch. If you're building in a docker context you can mount a volume containing build artifacts (target directory). Or `sccache` if you want those artifacts stored in a remote store such as S3. I'm sure there's other solutions as well, but not clearing build artifacts in between builds would be a simpler win over maintaining separate, shared infrastructure.
Then you'd be interested by https://github.com/denzp/cargo-wharf And DOCKER_HOST, and BuildKit!

And if any of this makes sense: https://fenollp.github.io/faster-rust-builds-docker_host

It's relatively easy with Docker to just point your local docker tooling at a remote daemon.

That way during the build process you're only transferring the cwd around your Dockerfile (the build state) to the daemon, and it takes it from there.

Versus this that would be doing a lot of file i/o during the build process all back across the wire.

Docker image builds have caching! You can learn to leverage them without using a third-party tool.