diff --git a/Dockerfile b/Dockerfile index 10f19f372..414ad2abf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,9 @@ FROM ubuntu:24.04 +COPY bin /build-bin + RUN apt-get update \ - && apt-get install -y make curl git software-properties-common jq \ - && add-apt-repository -y ppa:longsleep/golang-backports \ - && add-apt-repository -y ppa:ethereum/ethereum \ - && apt-get update \ - && apt-get install -y golang-1.22 ethereum=1.14.5+build29958+noble \ - && curl -L https://foundry.paradigm.xyz | bash \ - && /root/.foundry/bin/foundryup - -RUN cp -R /root/.foundry/bin/* /usr/local/bin/ + && apt-get install -y make curl git software-properties-common jq sudo + +RUN /build-bin/install-deps.sh diff --git a/Makefile b/Makefile index 6fc082207..f4278d456 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,6 @@ install-hooks: .PHONY: install-deps install-deps: ./bin/install-deps.sh - foundryup .PHONY: deps deps: install-hooks install-deps diff --git a/bin/install-deps.sh b/bin/install-deps.sh index a1d909030..43653239b 100755 --- a/bin/install-deps.sh +++ b/bin/install-deps.sh @@ -1,19 +1,36 @@ #!/usr/bin/env bash OS=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -a | tr '[:upper:]' '[:lower:]') + +linuxAmd64="https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.14.6-aadddf3a.tar.gz" +linuxArm64="https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-arm64-1.14.5-0dd173a7.tar.gz" + if [[ "$OS" == "linux" ]]; then sudo apt-get update sudo apt-get install -y make curl git software-properties-common jq - sudo add-apt-repository -y ppa:ethereum/ethereum - sudo apt-get update - sudo apt-get install ethereum=1.14.5+build29958+noble - curl -L https://foundry.paradigm.xyz | bash + + if [[ $ARCH == *"x86_64"* ]]; then + curl -L $linuxAmd64 | tar -xz + elif [[ $ARCH == *"aarch64"* ]]; then + curl -L $linuxArm64 | tar -xz + else + echo "Unsupported architecture: $ARCH" + exit 1 + fi elif [[ "$OS" == "darwin" ]]; then brew tap ethereum/ethereum brew install libusb ethereum@1.14.5 - curl -L https://foundry.paradigm.xyz | bash else echo "Unsupported OS: $OS" exit 1 fi + +curl -L https://foundry.paradigm.xyz | bash + +cp -R /root/.foundry/bin/* /usr/local/bin/ + +foundryup + +cp -R /root/.foundry/bin/* /usr/local/bin/