Sanitize `Cargo.toml` values when creating Docker image
Open
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
We currently copy `Cargo.toml` into the container in our `Dockerfile` in order to be able to pre-build dependencies and run the `setup` command. However, some values in the manifest are irrelevant for these. Whenever they change, then in both local development and in CI (in particular, our container cache/registry), the image must be rebuilt. We should attempt to sanitize as many of these as possible to reduce the rate of rebuidls.
As of this writing, the following can all in theory be sanitized:
https://github.com/google/zerocopy/blob/5b38beb06020dc6b5e2aac81187350d002ec7e15/anneal/Cargo.toml#L6-L22
Contributor guide
Assessment
This issue has not been assessed yet.