Last active
August 14, 2021 18:26
-
-
Save pedromfedricci/9b2a647b6170eac52d0e0ab72bdb9e74 to your computer and use it in GitHub Desktop.
Image for Rust development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG RUST_IMAGE=rust:latest | |
FROM $RUST_IMAGE AS install-system-packages | |
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | |
# Programming tool for memory debugging and profilling. | |
valgrind \ | |
&& \ | |
apt-get remove -y --auto-remove && rm -rf /var/lib/apt/lists/* | |
FROM install-system-packages AS create-rust-user | |
ARG USER=rust | |
RUN useradd $USER --shell /bin/bash --create-home | |
USER $USER | |
FROM create-rust-user AS install-rust-components | |
RUN rustup component add \ | |
clippy \ | |
rustfmt \ | |
rust-docs \ | |
rust-src | |
FROM install-rust-components AS install-cargo-tools | |
RUN cargo install \ | |
cargo-audit \ | |
cargo-edit \ | |
cargo-expand \ | |
cargo-make \ | |
cargo-tarpaulin \ | |
cargo-valgrind | |
FROM install-cargo-tools AS development-environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment