diff --git a/ops/docker/ci-builder/Dockerfile b/ops/docker/ci-builder/Dockerfile index b7e2d6a3e3e2..38d6dacf9e70 100644 --- a/ops/docker/ci-builder/Dockerfile +++ b/ops/docker/ci-builder/Dockerfile @@ -12,6 +12,9 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ chmod +x ./rustup.sh && \ ./rustup.sh -y +# Install nightly toolchain +RUN source $HOME/.profile && rustup update nightly + RUN source $HOME/.profile && cargo install just RUN source $HOME/.profile && cargo install svm-rs @@ -59,8 +62,12 @@ FROM --platform=linux/amd64 python:3.11.4-slim-bullseye ENV GOPATH=/go ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH +ENV PATH=/root/.cargo/bin:$PATH ENV DEBIAN_FRONTEND=noninteractive +# Create rust directories for copying the installation into +RUN mkdir /root/.cargo && mkdir /root/.cargo/bin && mkdir /root/.rustup + # copy the go installation, but not the module cache (cache will get stale, and would add a lot of weight) COPY --from=go-build /usr/local/go /usr/local/go # copy tools @@ -69,11 +76,15 @@ COPY --from=go-build /go/bin/mockery /go/bin/mockery COPY --from=go-build /go/bin/golangci-lint /go/bin/golangci-lint COPY --from=go-build /go/bin/abigen /usr/local/bin/abigen COPY --from=go-build /go/bin/geth /usr/local/bin/geth -COPY --from=rust-build /root/.cargo/bin/svm /usr/local/bin/svm -COPY --from=rust-build /root/.cargo/bin/just /usr/local/bin/just + +# copy the rust installation, alongside the installed toolchains +COPY --from=rust-build /root/.cargo/bin /root/.cargo/bin +COPY --from=rust-build /root/.rustup /root/.rustup +# copy tools COPY --from=rust-build /opt/foundry/target/release/forge /usr/local/bin/forge COPY --from=rust-build /opt/foundry/target/release/cast /usr/local/bin/cast COPY --from=rust-build /opt/foundry/target/release/anvil /usr/local/bin/anvil + COPY --from=echidna-test /usr/local/bin/echidna-test /usr/local/bin/echidna-test COPY .nvmrc .nvmrc @@ -84,7 +95,7 @@ ENV SLITHER_VERSION=0.10.0 # note: python3 package in apt is python 3.9, while base image already has python 3.11 RUN /bin/sh -c set -eux; \ apt-get update; \ - apt-get install -y --no-install-recommends bash curl openssh-client git build-essential ca-certificates jq gnupg binutils-mips-linux-gnu; \ + apt-get install -y --no-install-recommends bash curl openssh-client git build-essential pkg-config libssl-dev clang libclang-dev ca-certificates jq gnupg binutils-mips-linux-gnu; \ mkdir -p /etc/apt/keyrings; \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \