mirror of
https://github.com/dockersrc/rust
synced 2026-06-24 14:01:04 -04:00
📝 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:
@@ -16,11 +16,11 @@ docker pull casjaysdev/rust:latest
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚡ Default behavior
|
## ⚡ rust-workflow
|
||||||
|
|
||||||
Running the container with no arguments automatically executes
|
**`rust-workflow`** is a four-step pipeline included in the image. It must
|
||||||
**`rust-workflow`** — a four-step pipeline against the project mounted at
|
be called explicitly — running the container with no arguments starts it in
|
||||||
`/app`:
|
monitoring mode, it does not execute `rust-workflow` automatically:
|
||||||
|
|
||||||
```
|
```
|
||||||
fmt check → clippy -D warnings → cargo test --all → cargo build --release
|
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
|
# run the full workflow against your project
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
-v "$PWD:/app" \
|
-v "$PWD:/app" \
|
||||||
casjaysdev/rust:latest
|
casjaysdev/rust:latest rust-workflow
|
||||||
```
|
```
|
||||||
|
|
||||||
Override the working directory with `CARGO_WORKDIR`, or target a specific
|
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 \
|
docker run --rm -it \
|
||||||
-v "$PWD:/app" \
|
-v "$PWD:/app" \
|
||||||
-e CARGO_BUILD_TARGET=aarch64-unknown-linux-musl \
|
-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 .
|
docker build --tag casjaysdev/rust:local .
|
||||||
```
|
```
|
||||||
|
|
||||||
Cache mount IDs: `apk-cache`, `cargo-registry`, `cargo-git`,
|
Cache mount IDs: `apk-cache-<arch>`, `cargo-registry`, `cargo-git-<arch>`,
|
||||||
`rustup-downloads`, `sccache-build`.
|
`rustup-downloads-<arch>`, `sccache-build-<arch>` (where `<arch>` is
|
||||||
|
`amd64` or `arm64` — per-arch IDs prevent cross-arch cache corruption in
|
||||||
|
multi-platform builds).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user