File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,20 @@ RUN apk add --no-cache \
1919 curl
2020
2121RUN rustup component add clippy rustfmt \
22- && cargo install cargo-deny \
2322 && curl -LsSf https://get.nexte.st/latest/linux-musl | tar zxf - -C /usr/local/cargo/bin
2423
24+ # cargo-deny: pinned, checksum-verified prebuilt binary. The static musl build
25+ # runs on glibc too, so every image shares one asset. Installing the binary
26+ # (instead of `cargo install cargo-deny`) skips a multi-minute source compile.
27+ ARG CARGO_DENY_VERSION=0.19.8
28+ ARG CARGO_DENY_SHA256=70e769ae3872e34d45132b17040859175e11401dc12dddb0303e0b8c7d088f3f
29+ RUN curl -LsSf "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" -o /tmp/cargo-deny.tar.gz \
30+ && echo "${CARGO_DENY_SHA256} /tmp/cargo-deny.tar.gz" | sha256sum -c - \
31+ && tar zxf /tmp/cargo-deny.tar.gz -C /tmp \
32+ && install -m 0755 "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny" /usr/local/cargo/bin/cargo-deny \
33+ && rm -rf /tmp/cargo-deny.tar.gz "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl" \
34+ && cargo-deny --version
35+
2536RUN adduser -D -s /bin/bash testuser \
2637 && adduser -D -s /bin/sh testuser2 \
2738 && addgroup testgroup \
Original file line number Diff line number Diff line change @@ -16,9 +16,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616 && rm -rf /var/lib/apt/lists/*
1717
1818RUN rustup component add clippy rustfmt \
19- && cargo install cargo-deny \
2019 && curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/cargo/bin
2120
21+ # cargo-deny: pinned, checksum-verified prebuilt binary. The static musl build
22+ # runs on glibc too, so every image shares one asset. Installing the binary
23+ # (instead of `cargo install cargo-deny`) skips a multi-minute source compile.
24+ ARG CARGO_DENY_VERSION=0.19.8
25+ ARG CARGO_DENY_SHA256=70e769ae3872e34d45132b17040859175e11401dc12dddb0303e0b8c7d088f3f
26+ RUN curl -LsSf "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" -o /tmp/cargo-deny.tar.gz \
27+ && echo "${CARGO_DENY_SHA256} /tmp/cargo-deny.tar.gz" | sha256sum -c - \
28+ && tar zxf /tmp/cargo-deny.tar.gz -C /tmp \
29+ && install -m 0755 "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny" /usr/local/cargo/bin/cargo-deny \
30+ && rm -rf /tmp/cargo-deny.tar.gz "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl" \
31+ && cargo-deny --version
32+
2233RUN useradd -m -s /bin/bash testuser \
2334 && useradd -m -s /bin/sh testuser2 \
2435 && groupadd testgroup \
Original file line number Diff line number Diff line change @@ -24,8 +24,19 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
2424 --component clippy,rustfmt
2525ENV PATH="/root/.cargo/bin:${PATH}"
2626
27- RUN cargo install cargo-deny \
28- && curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /root/.cargo/bin
27+ RUN curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /root/.cargo/bin
28+
29+ # cargo-deny: pinned, checksum-verified prebuilt binary. The static musl build
30+ # runs on glibc too, so every image shares one asset. Installing the binary
31+ # (instead of `cargo install cargo-deny`) skips a multi-minute source compile.
32+ ARG CARGO_DENY_VERSION=0.19.8
33+ ARG CARGO_DENY_SHA256=70e769ae3872e34d45132b17040859175e11401dc12dddb0303e0b8c7d088f3f
34+ RUN curl -LsSf "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" -o /tmp/cargo-deny.tar.gz \
35+ && echo "${CARGO_DENY_SHA256} /tmp/cargo-deny.tar.gz" | sha256sum -c - \
36+ && tar zxf /tmp/cargo-deny.tar.gz -C /tmp \
37+ && install -m 0755 "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny" /root/.cargo/bin/cargo-deny \
38+ && rm -rf /tmp/cargo-deny.tar.gz "/tmp/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl" \
39+ && cargo-deny --version
2940
3041RUN useradd -m -s /bin/bash testuser \
3142 && useradd -m -s /bin/sh testuser2 \
You can’t perform that action at this time.
0 commit comments