2017-09-16 14:13:09 -04:00
|
|
|
Using Docker
|
|
|
|
============
|
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
It is assumed that you have already `setup docker <https://docs.docker.com/engine/installation/>`__.
|
2017-09-16 14:13:09 -04:00
|
|
|
|
|
|
|
Tendermint
|
|
|
|
----------
|
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
The application configuration and data will be stored at ``/tendermint`` in the
|
|
|
|
container. This directory will also be exposed as a volume. The ports 46656 and
|
|
|
|
46657 will be open for ABCI applications to connect.
|
2017-09-16 14:13:09 -04:00
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
Initialize tendermint:
|
2017-09-16 14:13:09 -04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
mkdir /tmdata
|
|
|
|
docker run --rm -v /tmdata:/tendermint tendermint/tendermint init
|
|
|
|
|
|
|
|
Change ``/tmdata`` folder to any destination where you want to store Tendermint
|
|
|
|
configuration and data.
|
2017-09-16 14:13:09 -04:00
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
Tendermint docker image is stored on `docker hub <https://hub.docker.com/r/tendermint/tendermint/>`__.
|
2017-09-16 14:13:09 -04:00
|
|
|
|
|
|
|
Get the public key of tendermint:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
docker run --rm -v /tmdata:/tendermint tendermint/tendermint show_validator
|
2017-09-16 14:13:09 -04:00
|
|
|
|
|
|
|
Run the docker tendermint application with:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-11-23 17:44:23 -06:00
|
|
|
docker run --rm -d -v /tmdata:/tendermint tendermint/tendermint node
|
|
|
|
|
|
|
|
Building images by yourself:
|
|
|
|
|
|
|
|
`This folder <https://github.com/tendermint/tendermint/tree/master/DOCKER>`__
|
|
|
|
contains Docker container descriptions. Using this folder you can build your
|
|
|
|
own Docker images with the tendermint application.
|
2017-09-16 14:13:09 -04:00
|
|
|
|
|
|
|
Ethermint
|
|
|
|
---------
|
|
|
|
|
|
|
|
Build the container: Copy the ``ethermint`` binary and the setup folder
|
|
|
|
to the ``ethermint`` folder.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
docker build -t ethermint ethermint
|
|
|
|
|
|
|
|
The application configuration will be stored at ``/ethermint``. The
|
|
|
|
files required for initializing ethermint (the files in the source
|
|
|
|
``setup`` folder) are under ``/setup``.
|
|
|
|
|
|
|
|
Initialize ethermint configuration:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
docker run --rm -v ethermintdata:/ethermint ethermint init /setup/genesis.json
|
|
|
|
|
|
|
|
Start ethermint as a validator node: This is a two-step process: \* Run
|
|
|
|
the ethermint container. You will have to define where tendermint runs
|
|
|
|
as the ethermint binary connects to it explicitly. \* Run the tendermint
|
|
|
|
container and expose the ports that allow clients to connect. The
|
|
|
|
--proxy\_app should contain the ethermint application's IP address and
|
|
|
|
port.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
docker run --rm -d -v ethermintdata:/ethermint ethermint --tendermint_addr tcp://172.17.0.3:46657
|
|
|
|
docker run --rm -d -v data:/tendermint -p 46656-46657:46656-46657 tendermint node --proxy_app tcp://172.17.0.2:46658
|