This repository comes with built-in Dockerfile to support docker containers. This README serves as documentation.
The Dockerfile
performs the following steps:
- Obtain base image (phusion/baseimage:0.10.1)
- Install required dependencies using
apt-get
- Add kreel-core source code into container
- Update git submodules
- Perform
cmake
with build typeRelease
- Run
make
andmake_install
(this will install binaries into/usr/local/bin
- Purge source code off the container
- Add a local kreel user and set
$HOME
to/var/lib/kreel
- Make
/var/lib/kreel
and/etc/kreel
a docker volume - Expose ports
8980
and4776
- Add default config from
docker/default_config.ini
anddocker/default_logging.ini
- Add an entry point script
- Run the entry point script by default
The entry point simplifies the use of parameters for the witness_node
(which is run by default when spinning up the container).
$KREELD_SEED_NODES
$KREELD_RPC_ENDPOINT
$KREELD_PLUGINS
$KREELD_REPLAY
$KREELD_RESYNC
$KREELD_P2P_ENDPOINT
$KREELD_WITNESS_ID
$KREELD_PRIVATE_KEY
$KREELD_TRACK_ACCOUNTS
$KREELD_PARTIAL_OPERATIONS
$KREELD_MAX_OPS_PER_ACCOUNT
$KREELD_ES_NODE_URL
$KREELD_TRUSTED_NODE
The default configuration is:
p2p-endpoint = 0.0.0.0:4776
rpc-endpoint = 0.0.0.0:8980
bucket-size = [60,300,900,1800,3600,14400,86400]
history-per-size = 1000
max-ops-per-account = 100
partial-operations = true
With docker compose, multiple nodes can be managed with a single
docker-compose.yaml
file:
version: '3'
services:
main:
# Image to run
image: kreel/kreel-core:latest
#
volumes:
- ./docker/conf/:/etc/kreel/
# Optional parameters
environment:
- KREELD_ARGS=--help
version: '3'
services:
fullnode:
# Image to run
image: kreel/kreel-core:latest
environment:
# Optional parameters
environment:
- KREELD_ARGS=--help
ports:
- "0.0.0.0:8980:8980"
volumes:
- "kreel-fullnode:/var/lib/kreel"
This container is properly registered with Ghrc container registry as:
Going forward, every release tag as well as all pushes to testnet
will be built into ready-to-run containers, there.
One can use docker compose to setup a trusted full node together with a delayed node like this:
version: '3'
services:
fullnode:
image: ghrc.io/kreel-chain/kreel-core:latest
ports:
- "0.0.0.0:8980:8980"
volumes:
- "kreel-fullnode:/var/lib/kreel"
delayed_node:
image: kreel/kreel-core:latest
environment:
- 'KREELD_PLUGINS=delayed_node witness'
- 'KREELD_TRUSTED_NODE=ws://fullnode:8980'
ports:
- "0.0.0.0:8981:8980"
volumes:
- "kreel-delayed_node:/var/lib/kreel"
links:
- fullnode
volumes:
kreel-fullnode: