Skip to content

Commit

Permalink
chore: update Dockerfiles (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct authored Oct 16, 2024
1 parent 1723f6e commit d2d3663
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docker/toolbox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion docker/zkevm-bridge-ui/zkevm-bridge-ui.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19 AS builder
FROM alpine:3.20 AS builder

# STEP 1: Clone zkevm-bridge-ui repository.
ARG ZKEVM_BRIDGE_UI_TAG
Expand Down
12 changes: 4 additions & 8 deletions docker/zkevm-contracts.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit d2d3663

Please sign in to comment.