-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ FROM golang:1.21 AS polycli-builder | |
ARG POLYCLI_VERSION | ||
WORKDIR /opt/polygon-cli | ||
RUN git clone --branch ${POLYCLI_VERSION} https://github.com/maticnetwork/polygon-cli.git . \ | ||
&& CGO_ENABLED=0 go build -o polycli main.go | ||
&& go build -o polycli main.go | ||
|
||
|
||
FROM ubuntu:22.04 | ||
FROM ubuntu:24.04 | ||
LABEL author="[email protected]" | ||
LABEL description="Blockchain toolbox" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,25 @@ FROM golang:1.21 AS polycli-builder | |
ARG POLYCLI_VERSION | ||
WORKDIR /opt/polygon-cli | ||
RUN git clone --branch ${POLYCLI_VERSION} https://github.com/maticnetwork/polygon-cli.git . \ | ||
&& CGO_ENABLED=0 go build -o polycli main.go | ||
&& go build -o polycli main.go | ||
|
||
|
||
FROM node:20-bookworm | ||
FROM node:22-bookworm | ||
LABEL author="[email protected]" | ||
LABEL description="Helper image to deploy zkevm contracts" | ||
|
||
# STEP 1: Download zkevm contracts dependencies and compile contracts. | ||
ARG ZKEVM_CONTRACTS_BRANCH | ||
WORKDIR /opt/zkevm-contracts | ||
# FIX: `npm install` randomly fails with ECONNRESET and ETIMEDOUT errors by installing npm>=10.5.1. | ||
# https://github.com/npm/cli/releases/tag/v10.5.1 | ||
RUN git clone https://github.com/0xPolygonHermez/zkevm-contracts . \ | ||
&& git checkout ${ZKEVM_CONTRACTS_BRANCH} \ | ||
&& npm install --global npm@10.6.0 \ | ||
&& npm install --global npm@10.9.0 \ | ||
&& npm install \ | ||
&& npx hardhat compile | ||
|
||
# STEP 2: Install tools. | ||
COPY --from=polycli-builder /opt/polygon-cli/polycli /usr/bin/polycli | ||
WORKDIR /opt | ||
# Note: We download a specific version of foundry because we had issues with the recent releases. | ||
# https://github.com/0xPolygon/kurtosis-cdk/pull/76#issuecomment-2070645918 | ||
# WARNING (DL3008): Pin versions in apt get install. | ||
# WARNING (DL3013): Pin versions in pip. | ||
# WARNING (DL4006): Set the SHELL option -o pipefail before RUN with a pipe in it | ||
|
@@ -35,7 +31,7 @@ RUN apt-get update \ | |
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip3 install --break-system-packages --no-cache-dir yq \ | ||
&& curl --silent --location --proto "=https" https://foundry.paradigm.xyz | bash \ | ||
&& /root/.foundry/bin/foundryup --version nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9 \ | ||
&& /root/.foundry/bin/foundryup \ | ||
&& cp /root/.foundry/bin/* /usr/local/bin | ||
|
||
USER node |