Build, test, format, and lint Rust projects.
737
Build, test, format, and lint Rust projects.
This image contains the current stable Rust toolchain from the official Rust base image.
It includes rustc, Cargo, rustfmt, and Clippy.
The default working directory is /workspace. The default command is Bash.
| Tag | Meaning | Platform |
|---|---|---|
latest | Latest successful build from main | linux/amd64 |
The latest tag changes after a new build passes its tests.
See all tags and digests.
docker pull stden/rust:latest
docker run --rm -v "$PWD":/workspace stden/rust:latest cargo test
docker run --rm -v "$PWD":/workspace stden/rust:latest cargo fmt --check
docker run --rm -v "$PWD":/workspace stden/rust:latest cargo clippy --all-targets -- -D warnings
Run these commands from a project directory that contains Cargo.toml.
Cargo downloads your project dependencies when necessary. The image does not contain them.
Build output stays in the mounted project directory.
Files that the container creates belong to root.
The smoke test checks the Rust compiler, Cargo, rustfmt, and Clippy commands.
Content type
Image
Digest
sha256:74d8e92f7…
Size
583.7 MB
Last updated
1 day ago
docker pull stden/rust