The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/scripts/docker/README.md

1.9 KiB

Docker Image

Included in this repo is a Dockerfile that you can launch woop node for trying it out. Docker images are available on woopchain/woop.

You can build the docker image with the following commands:

make docker

If your build machine has an ARM-based chip, like Apple silicon (M1), the image is built for linux/arm64 by default. To build for x86_64, apply the --platform arg:

docker build --platform linux/amd64 -t woopchain/woop -f Dockerfile .

Before start the docker, dump the default config woop.conf by running:

for testnet

docker run -v $(pwd)/config:/woop --rm --name woop woopchain/woop woop config dump --network testnet woop.conf

for mainnet

docker run -v $(pwd)/config:/woop --rm --name woop woopchain/woop woop config dump woop.conf

make your customization. woop.conf should be mounted into default HOME directory /woop inside the container. Assume woop.conf, blskeys and wikikey are under ./config in your current working directory, you can start your docker container with the following command:

docker run -v $(pwd)/config:/woop --rm --name woop -it woopchain/woop

If you need to open another shell, just do:

docker exec -it woopchain/woop /bin/bash

We also provide a docker-compose file for local testing

To use the container in kubernetes, you can use a configmap or secret to mount the woop.conf into the container

containers:
  - name: woop
    image: woopchain/woop
    ports:
      - name: p2p
        containerPort: 9000  
      - name: rpc
        containerPort: 9500
      - name: ws
        containerPort: 9800     
    volumeMounts:
      - name: config
        mountPath: /woop/woop.conf
  volumes:
    - name: config
      configMap:
        name: cm-woop-config
    

Your configmap cm-woop-config should look like this:

apiVersion: v1
kind: ConfigMap
metadata:
  name: cm-woop-config
data:
  woop.conf: |
    ...