Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install rustc #8

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ ADD assets/99${version}.list /etc/apt/sources.list.d/
ADD assets/sudoers /etc/sudoers.d/
RUN chmod 0440 /etc/sudoers.d/*

RUN mkdir /rust
RUN wget \
--https-only \
--secure-protocol=TLSv1_2 \
--output-document=- \
https://sh.rustup.rs \
| env \
RUSTUP_HOME=/rust/rustup \
CARGO_HOME=/rust/cargo \
/bin/sh \
-s \
-- \
--default-toolchain=stable \
--profile=minimal \
--no-modify-path \
-y

FROM ${os}:${version}${variant} as compilers
ARG baseruby
ARG packages
Expand All @@ -35,12 +52,15 @@ COPY --from=assets /etc/ssl /etc/ssl
COPY --from=assets /etc/apt /etc/apt
COPY --from=assets /etc/dpkg /etc/dpkg
COPY --from=assets /etc/sudoers.d /etc/sudoers.d
COPY --from=assets /rust /rust
ENV RUSTUP_HOME=/rust/rustup
ENV PATH=${PATH}:/rust/cargo/bin

RUN set -ex \
&& apt-get update \
&& apt-get install ${packages} \
libjemalloc-dev openssl libyaml-dev ruby tzdata valgrind sudo docker.io \
libreadline-dev \
libreadline-dev libcapstone-dev \
&& apt-get build-dep ruby${baseruby}

RUN adduser --disabled-password --gecos '' ci && adduser ci sudo
Expand Down