Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental build caching for Rust in builder Docker image #3097

Open
patchwork01 opened this issue Aug 19, 2024 · 0 comments
Open

Incremental build caching for Rust in builder Docker image #3097

patchwork01 opened this issue Aug 19, 2024 · 0 comments

Comments

@patchwork01
Copy link
Collaborator

patchwork01 commented Aug 19, 2024

Background

Split from:

Description

We'd like to add incremental build caching for the Rust dependencies, when we run the Rust build in the Sleeper CLI builder image, or in a dev container (using the same Docker image).

This should mean that when we start a new builder from the CLI or in a dev container, we retain the Rust cache from previous invocations.

Analysis

The Sccache support we added in the linked issue sets SCCACHE_DIR, but it uses a local directory inside the container that isn't mounted from the host.

We tried to mount a directory from the host and set that as SCCACHE_DIR, but that didn't seem to work. It may be related to some issues in cross with docker-in-docker:

We could wait for that to be resolved, or for cross to provide a more reliable way to mount directories into the container. The ideal may be to mount a directory to a fixed path inside the container. Right now it has to be to the same path, but set in an environment variable inside the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant