5 Comments
User's avatar
Usha's avatar

I am facing the same issue. i have setup minio for this but not sure how to use the bucket cache without modifying my docker file. I have cargo install with --target-dir. i want to cache deps

Expand full comment
Aaron Batilo's avatar

Hi Usha!

Rust builds are very hard to cache in Docker builds.

The creators of Depot have actually written about this better than I can!

https://depot.dev/blog/rust-dockerfile-best-practices

Expand full comment
IVData's avatar

Did you end up getting an EFS mount to work?

I'd like to do the same but am running into issues

Expand full comment
Aaron Batilo's avatar

I did not ever end up trying it. What kind of errors?

Expand full comment
IVData's avatar

I get weird errors when I have a FSx volume mounted on /var/lib/buildkit:

error: failed to solve: process "/bin/sh -c apt update && apt-get upgrade -y && apt install -y build-essential" did not complete successfully: invalid argument

And I wish you could specify a location for local caches to be stored on the agent.. I'm going to try mounting only over /var/lib/buildkit/runc_overlays or runc_overlays/snapshots and runc_overlays/cachemounts

Expand full comment