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:18.04-1.0.0)
- Install required dependencies using
apt
- Add revpop-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 revpop user and set
$HOME
to/var/lib/revpop
- Make
/var/lib/revpop
and/etc/revpop
a docker volume - Expose ports
8090
and2771
- Add default config from
docker/default_config.ini
and entry point script - Run 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).
You can launch a build process with a command
$ docker build $REVPOP_CORE_DIR -t local/revpop-core:latest
$REVPOPD_SEED_NODES
$REVPOPD_RPC_ENDPOINT
$REVPOPD_PLUGINS
$REVPOPD_REPLAY
$REVPOPD_RESYNC
$REVPOPD_P2P_ENDPOINT
$REVPOPD_WITNESS_ID
$REVPOPD_PRIVATE_KEY
$REVPOPD_TRACK_ACCOUNTS
$REVPOPD_PARTIAL_OPERATIONS
$REVPOPD_MAX_OPS_PER_ACCOUNT
$REVPOPD_ES_NODE_URL
$REVPOPD_TRUSTED_NODE
The default configuration is:
p2p-endpoint = 0.0.0.0:2771
rpc-endpoint = 0.0.0.0:8090
enable-stale-production = false
max-ops-per-account = 1000
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: local/revpop-core:latest
#
volumes:
- ./docker/conf/:/etc/revpop/
# Optional parameters
environment:
- REVPOPD_ARGS=--help
or
version: '3'
services:
fullnode:
# Image to run
image: local/revpop-core:latest
environment:
# Optional parameters
- REVPOPD_ARGS=--help
ports:
- "0.0.0.0:8090:8090"
volumes:
- "revpop-fullnode:/var/lib/revpop"
This container is properly registered with the Amazon ECR service:
Going forward, every release tag 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: public.ecr.aws/revpop/revpop-core:latest
ports:
- "0.0.0.0:8090:8090"
volumes:
- "revpop-fullnode:/var/lib/revpop"
delayed_node:
image: public.ecr.aws/revpop/revpop-core:latest
environment:
- 'REVPOPD_PLUGINS=delayed_node witness'
- 'REVPOPD_TRUSTED_NODE=ws://fullnode:8090'
ports:
- "0.0.0.0:8091:8090"
volumes:
- "revpop-delayed_node:/var/lib/revpop"
links:
- fullnode
volumes:
revpop-fullnode: