Skip to content

Latest commit

 

History

History
143 lines (101 loc) · 5.08 KB

README.md

File metadata and controls

143 lines (101 loc) · 5.08 KB

Custom Docker Images for Kurtosis CDK

We maintain a suite of custom Docker images tailored specifically for deploying the CDK stack. These images serve various purposes, including hosting distinct zkEVM contracts (each fork tagged separately), adapting the bridge UI to support relative URLs, and applying specific workloads.

Docker Images

ZkEVM Contracts

Kurtosis CDK's zkevm contracts images are hosted on the Docker Hub.

These images share the same tags as 0xPolygonHermez/zkevm-contracts.

🚨 Images must be suffixed with -fork.<id> to work properly with Kurtosis CDK!

Fork ID zkEVM Contracts Tag / Commit Image
13-RC1 v8.1.0-rc.1-fork.13 leovct/zkevm-contracts:v8.1.0-rc.1-fork.13
12-PP-RC2 v9.0.0-rc.2-pp leovct/zkevm-contracts:v9.0.0-rc.2-pp-fork.12
12-PP-RC1 v9.0.0-rc.1-pp leovct/zkevm-contracts:v9.0.0-rc.1-pp-fork.12
12-RC4 v8.0.0-rc.4-fork.12 leovct/zkevm-contracts:v8.0.0-rc.4-fork.12
12-RC3 v8.0.0-rc.3-fork.12 leovct/zkevm-contracts:v8.0.0-rc.3-fork.12
12-RC2 v8.0.0-rc.2-fork.12 leovct/zkevm-contracts:v8.0.0-rc.2-fork.12
12-RC1 v8.0.0-rc.1-fork.12 leovct/zkevm-contracts:v8.0.0-rc.1-fork.12
11-RC2 v7.0.0-rc.2-fork.10 leovct/zkevm-contracts:v7.0.0-rc.2-fork.11
9-RC1 v6.0.0-rc.1-fork.9 leovct/zkevm-contracts:v6.0.0-rc.1-fork.9

ZkEVM Bridge UI

Kurtosis CDK's zkevm bridge UI images are hosted on the Docker Hub.

zkEVM Bridge UI Tag / Commit Image
develop@0006445 leovct/zkevm-bridge-ui:multi-network

Custom Docker Images

If you ever need to build these images locally, here's a brief guide.

Provision an Ubuntu/Debian VM.

Switch to admin.

sudo su

Install docker.

curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install --yes docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
docker run hello-world

Clone the repository.

mkdir /tmp/kurtosis-cdk
git clone https://github.com/0xPolygon/kurtosis-cdk /tmp/kurtosis-cdk

Move to the docker folder.

pushd /tmp/kurtosis-cdk/docker

ZkEVM Contracts

This image contains all the npm dependencies and zkevm contracts compiled for a specific fork id.

Automate the build process using this CI workflow. Images will be automatically pushed to the Docker Hub.

Build the zkevm-contracts image.

version="v9.0.0-rc.2-pp-fork.12"
docker build . \
  --tag local/zkevm-contracts:$version \
  --build-arg ZKEVM_CONTRACTS_BRANCH=$version \
  --build-arg POLYCLI_VERSION=main \
  --file zkevm-contracts.Dockerfile

Check the size of the image.

$ docker images --filter "reference=local/zkevm-contracts"
REPOSITORY              TAG                      IMAGE ID       CREATED          SIZE
local/zkevm-contracts   v9.0.0-rc.2-pp-fork.12   bdf8225cfa77   7 minutes ago    2.54GB

(Optional) Push image to the Docker Hub.

docker login
docker tag local/zkevm-contracts:$version leovct/zkevm-contracts:$version
docker push leovct/zkevm-contracts:$version

ZkEVM Bridge UI

This image contains an enhanced version of the zkEVM bridge UI with relative URL support enabled.

Build the zkevm-bridge-ui image.

docker build zkevm-bridge-ui \
  --tag local/zkevm-bridge-ui:local \
  --build-arg ZKEVM_BRIDGE_UI_TAG=develop \
  --file zkevm-bridge-ui/zkevm-bridge-ui.Dockerfile

Check the size of the image.

$ docker images --filter "reference=local/zkevm-bridge-ui"
REPOSITORY              TAG     IMAGE ID       CREATED          SIZE
local/zkevm-bridge-ui   local   040905e1cabe   28 seconds ago   377MB

Toolbox

This image contains different tools to interact with blockchains such as polycli or cast.

Build the toolbox image.

docker build . \
  --tag local/toolbox:local \
  --build-arg POLYCLI_VERSION=main \
  --file toolbox.Dockerfile

Check the size of the image.

$ docker images --filter "reference=local/toolbox"
REPOSITORY       TAG    IMAGE ID       CREATED         SIZE
local/toolbox   local   3f85f026aaf9   2 seconds ago   490MB