containers/rust/Dockerfile

23 lines
912 B
Docker

FROM debian:latest
LABEL org.opencontainers.image.authors="kaan@bgenc.net"
# Install dependencies for rustup & cargo-audit
RUN apt update && apt install curl wget build-essential gcc make pkg-config libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev -y
# Install rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh \
&& sh rustup-init.sh -y \
&& rm rustup-init.sh
# Install binstall
RUN curl --proto '=https' --tlsv1.2 -sSfL https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -zx -C $HOME/.cargo/bin/
ENV PATH=/root/.cargo/bin:$PATH
# Install cargo llvm-cov and llvm-tools-preview
RUN rustup component add llvm-tools-preview \
&& cargo binstall cargo-llvm-cov -y
# Install cargo-audit
RUN cargo install cargo-audit