📝 Fix README accuracy: rust-workflow invocation and cache mount IDs 📝

Two inaccuracies corrected:
- rust-workflow is not run automatically on `docker run` with no args;
the container starts in monitoring mode and rust-workflow must be
called explicitly — update all examples to pass `rust-workflow` as
the command argument and rename the section heading accordingly
- Cache mount IDs in the BuildKit section were missing the per-arch
suffix; corrected to apk-cache-<arch>, cargo-git-<arch>,
rustup-downloads-<arch>, sccache-build-<arch> and added a note
explaining why per-arch IDs are used in multi-platform builds
- README.md: fix default-behavior section and cache mount ID table

README.md
This commit is contained in:
2026-06-21 17:32:45 -04:00
parent 33adba3b32
commit 20cd92f941
+10 -8
View File
@@ -16,11 +16,11 @@ docker pull casjaysdev/rust:latest
---
## ⚡ Default behavior
## ⚡ rust-workflow
Running the container with no arguments automatically executes
**`rust-workflow`** — a four-step pipeline against the project mounted at
`/app`:
**`rust-workflow`** is a four-step pipeline included in the image. It must
be called explicitly — running the container with no arguments starts it in
monitoring mode, it does not execute `rust-workflow` automatically:
```
fmt check → clippy -D warnings → cargo test --all → cargo build --release
@@ -30,7 +30,7 @@ fmt check → clippy -D warnings → cargo test --all → cargo build --re
# run the full workflow against your project
docker run --rm -it \
-v "$PWD:/app" \
casjaysdev/rust:latest
casjaysdev/rust:latest rust-workflow
```
Override the working directory with `CARGO_WORKDIR`, or target a specific
@@ -40,7 +40,7 @@ cross-compile triple with `CARGO_BUILD_TARGET`:
docker run --rm -it \
-v "$PWD:/app" \
-e CARGO_BUILD_TARGET=aarch64-unknown-linux-musl \
casjaysdev/rust:latest
casjaysdev/rust:latest rust-workflow
```
---
@@ -366,8 +366,10 @@ the image after a change does not re-download anything:
docker build --tag casjaysdev/rust:local .
```
Cache mount IDs: `apk-cache`, `cargo-registry`, `cargo-git`,
`rustup-downloads`, `sccache-build`.
Cache mount IDs: `apk-cache-<arch>`, `cargo-registry`, `cargo-git-<arch>`,
`rustup-downloads-<arch>`, `sccache-build-<arch>` (where `<arch>` is
`amd64` or `arm64` — per-arch IDs prevent cross-arch cache corruption in
multi-platform builds).
---