From 4bf70763cdd9efd8c05352dddb3b6d4524f25736 Mon Sep 17 00:00:00 2001 From: Kaan Barmore-Genc Date: Fri, 25 Nov 2022 17:54:38 -0500 Subject: [PATCH] Add binstall & many needed packages --- Readme.md | 5 ++++- rust/Dockerfile | 17 +++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Readme.md b/Readme.md index 235d8d0..56e3498 100644 --- a/Readme.md +++ b/Readme.md @@ -19,7 +19,10 @@ Gives you access to `rsync`, `ssh`, and `scp` commands. [![Docker Pulls](https://img.shields.io/docker/pulls/seriousbug/rust) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/seriousbug/rust/latest)](https://hub.docker.com/r/seriousbug/rust) -Rust stable toolchain, with `rustup`, `fmt`, `clippy`, `llvm-cov`, `llvm-tools`, and `audit`. +Rust stable toolchain, with `rustup`, `binstall`, `fmt`, `clippy`, `llvm-cov`, `llvm-tools`, and `audit`. + +This is a pretty heavy package as it contains a lot of libraries and other +things I found useful for my work. --- diff --git a/rust/Dockerfile b/rust/Dockerfile index 9ecd388..eab6c3c 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -1,17 +1,22 @@ -FROM alpine:latest +FROM debian:latest LABEL org.opencontainers.image.authors="kaan@bgenc.net" -# Install rustup and other base packages we need to build stuff. -# Installing rustup with rustup-init also brings in fmt and clippy. -RUN apk add --no-cache rustup build-base pkgconfig openssl-dev \ - && rustup-init -y +# 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 install cargo-llvm-cov + && cargo binstall cargo-llvm-cov -y # Install cargo-audit RUN cargo install cargo-audit