Kagome
Polkadot Runtime Engine in C++17
Runing Kagome in docker container

In this tutorial you will learn how to execute Kagome-based Polkadot-host chain which can be used as a cryptocurrency, and interact with it by sending extrinsics and executing queries.

Prerequisites

  1. Docker container runtime must be installed in your OS. Manual of that can be found in official site.
  2. Image of kagome docker container is soramitsu/kagome
1 # In Debian-like OS (Debian, Ubuntu, Mint, etc.)
2 docker image pull soramitsu/kagome
  1. Directory containing configs and keys

Launch Kagome applications in docker

Brief

1 docker run \ # Run docker container
2  --interactive \ # Interactive mode
3  --tty \ # Allocate pseudo-TTY
4  --rm \ # Remove container (not image) after stop
5  --user `id -u`:`id -g` \ # Delegate current user permitions in container
6  --volume `pwd`:/kagome \ # Map current directory to directory in container
7  --publish DOCKER_PORT:HOST_PORT \ # Bind ports
8  soramitsu/kagome \ # Name of docker image of Kagome
9  APPLICATION \ # Startup application...
10  ARGUMENTS # ...and then its arguments

Example

For example we want to run syncing node in docker container with configs from here.

Run the following commands:

1 cd examples/first_kagome_chain
2 
3 docker run \
4  --interactive \
5  --tty \
6  --rm \
7  --user `id -u`:`id -g` \
8  --volume `pwd`:/kagome \
9  --publish 30363:30363 \
10  --publish 9933:9933 \
11  --publish 9944:9944 \
12  soramitsu/kagome \
13  kagome \
14  --chain localchain.json \
15  --base-path base_path \
16  --port 30363 \
17  --rpc-port 9933 \
18  --ws-port 9944

The similar way to run other kagome applications.