Skip to content

Commit

Permalink
Different take on a system wide rustup install
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <[email protected]>
  • Loading branch information
s0undt3ch committed Jul 4, 2023
1 parent 6bea5ee commit f166d3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions custom/packaging/centosstream-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ RUN yum update -y \
&& yum install -y --allowerasing curl \
&& python3 -m pip install awscli

ENV PATH="/root/.cargo/bin:$PATH"
RUN export RUSTUP_HOME=/opt/rust \
&& export CARGO_HOME=/opt/rust \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path \
RUN for fname in $(ls /opt/rust/bin); do echo -e '#!/bin/sh\n\nRUSTUP_HOME=/opt/rust exec /opt/rust/bin/${0##*/} "$@"' > /usr/bin/$fname; chmod +x /usr/bin/$fname; done \
&& rustc --version
6 changes: 4 additions & 2 deletions custom/packaging/debian-11.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ RUN apt update -y \
&& apt install -y apt-utils gnupg jq awscli python3 python3-venv python3-pip \
build-essential devscripts debhelper bash-completion git patchelf curl

ENV PATH="/root/.cargo/bin:$PATH"
RUN export RUSTUP_HOME=/opt/rust \
&& export CARGO_HOME=/opt/rust \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path \
RUN for fname in $(ls /opt/rust/bin); do echo -e '#!/bin/sh\n\nRUSTUP_HOME=/opt/rust exec /opt/rust/bin/${0##*/} "$@"' > /usr/bin/$fname; chmod +x /usr/bin/$fname; done \
&& rustc --version

0 comments on commit f166d3e

Please sign in to comment.