Skip to content

Latest commit

 

History

History
 
 

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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.

We ensure the continuous availability of our custom Docker images through an automated build process. A cron job is configured to run weekly, automatically triggering the build and push of these images. This ensures that the images are regularly updated with the latest changes and dependencies. Moreover, should immediate updates or manual initiation of the image-building process be required, users can access the GitHub UI for manual triggering. Alternatively, the images can be built locally by following the provided guide.

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 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.

Click to expand

Build the zkevm-contracts image.

docker build . \
  --tag local/zkevm-contracts:fork10 \
  --build-arg ZKEVM_CONTRACTS_BRANCH=v7.0.0-rc.1-fork.10 \
  --build-arg POLYCLI_VERSION=main \
  --file zkevm-contracts.Dockerfile
$ docker images --filter "reference=local/zkevm-contracts"
REPOSITORY              TAG       IMAGE ID       CREATED          SIZE
local/zkevm-contracts   fork9     54d894c6a5bd   10 minutes ago   2.3GB

Here's a quick reference matrix for mapping fork IDs to branches/releases:

Fork ID Branch
fork4 v1.1.0-fork.4
fork5 v2.0.0-fork.5
fork6 v3.0.0-fork.6
fork7 v4.0.0-fork.7
fork8 v5.0.1-rc.2-fork.8
fork9 v6.0.0-rc.1-fork.9
fork10 v7.0.0-rc.1-fork.10

ZkEVM Bridge UI

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

Click to expand

Build the zkevm-bridge-ui image.

docker build zkevm-bridge-ui \
  --tag local/zkevm-bridge-ui:multi-network \
  --build-arg ZKEVM_BRIDGE_UI_TAG=develop \
  --file zkevm-bridge-ui/zkevm-bridge-ui.Dockerfile
$ docker images --filter "reference=local/zkevm-bridge-ui"
REPOSITORY              TAG             IMAGE ID       CREATED          SIZE
local/zkevm-bridge-ui   multi-network   040905e1cabe   28 seconds ago   377MB

Toolbox

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

Click to expand

Build the toolbox image.

docker build . \
  --tag local/toolbox:0.0.1 \
  --build-arg POLYCLI_VERSION=main \
  --file toolbox.Dockerfile
$ docker images --filter "reference=local/toolbox"
REPOSITORY       TAG       IMAGE ID       CREATED         SIZE
local/toolbox   0.0.1     3f85f026aaf9   2 seconds ago   490MB