Run with Docker

Docker

Install docker\docker-compose

Install docker: https://docs.docker.com/get-docker/

Install docker-compose: https://docs.docker.com/compose/install/

Run

  1. Create a new directory:

mkdir zkverifier

  1. Create a configuration file in the directory:(zkVerifier_config.json)、docker-compose.yml

    1. configuration file

      zkVerifier_config.json

    {
        "chain": {
            "chain_name": "localhost",
            "rpc_url": "http://localhost:8545",
            "chain_id": 7,
            "start_block": 0,
            "offset_block": 200,
            "confirmations": 64
        },
        "zkverifier_contract": {
            "address": "0x……",
            "topic": "0x……"
        },
        "wallet": {
            "path":"/pk/wallet.keystore",
             "password": "testonly"
        },
        "log": {
            "level": "info"
        }
    }
    1. docker-compose.yml

      version: "3.5"
      networks:
        default:
          name: zkVerifier
      services:
         zkVerifier:
           image: ubuntu:22.04
           container_name: zkVerifier
           restart: unless-stopped
           volumes:
             - ./zkVerifier_config.json:/usr/src/app/config.json
             - ./wallet.keystore:/pk/wallet.keystore
           command: >
              zkVerifier-node -c /usr/src/app/config.json
    2. After entering the directory, run:

    cd zkverifier

    docker-compose -f docker-compose.yml up -d

Last updated