Debian-based Docker image with stable+nightly cargo fmt, clippy and deny enabled.
Debian Buster based Docker image with cargo fmt, clippy, release and deny enabled.
Useful to run cargo tools in your local CI without having to install cargo components manually.
Based on the latest official Rust docker image with both stable
and nightly
toolchains and tools enabled.
Target triple: *-x86_64-unknown-linux-gnu
.
cargo
commands:check
, test
, build
, tree
, doc
: included in base Rust imageclippy
: https://github.com/rust-lang/rust-clippydeny
: https://github.com/EmbarkStudios/cargo-denyrelease
: https://github.com/sunng87/cargo-releasefmt
: https://github.com/rust-lang/rustfmtld.bfd
: https://sourceware.org/binutilsld.gold
: https://sourceware.org/binutilsld.lld
(v17) https://lld.llvm.orgThe docker image is built daily and if all tools are available, the image is pushed to Docker Hub.
The image is guaranteed to have all listed tools available both in stable
and nightly
.
Currently only :latest
tag is available.
Run as a local user using Rust project in local $PWD
:
docker run
--rm \
-t \
--user "$(id -u)":"$(id -g)" \
-v "$PWD:/usr/src/myapp" \
realcundo/docker-rust-aio \
cargo clippy
To preserve cargo build files between runs (e.g. for incremental builds), use
mkdir "$LOCAL_RUST_CARGO_CACHE"
docker run \
--rm \
-t \
--user "$(id -u)":"$(id -g)" \
-v "$PWD:/usr/src/myapp" \
-v "$LOCAL_RUST_CARGO_CACHE:/usr/local/cargo/registry" \
realcundo/docker-rust-aio \
cargo clippy
Make sure that $LOCAL_RUST_CARGO_CACHE
exists before running the docker container. Otherwise it’ll be created by docker as a root user and your local user won’t be able to access it.
Feel free to open PRs to include your favourite cargo component.