Build the `tendermint` binary and the `tendermint/localnode` docker image:
```
cd $GOPATH/src/github.com/tendermint/tendermint
# Install dependencies (skip if already done)
make get_tools
make get_vendor_deps
# Build binary in ./build
make build-linux
# Build tendermint/localnode image
make build-docker-localnode
```
Run a testnet
-------------
To start a 4 node testnet run:
```
make localnet-start
``
The nodes bind their RPC servers to ports 46657, 46660, 46662, and 46664 on the host.
This file creates a 4-node network using the localnode image.
The nodes of the network expose their P2P and RPC endpoints to the host machine on ports 46656-46657, 46659-46660, 46661-46662, and 46663-46664 respectively.
To update the binary, just rebuild it and restart the nodes:
```
make build-linux
make localnet-stop
make localnet-start
```
Configuration
-----------
Image for local testnets.
Add the tendermint binary to the image by attaching it in a folder to the `/tendermint` mount point.
The `make localnet-start` creates files for a 4-node testnet in `./build` by calling the `tendermint testnet` command.
The `./build` directory is mounted to the `/tendermint` mount point to attach the binary and config files to the container.
It assumes that the configuration was created by the `tendermint testnet` command and it is also attached to the `/tendermint` mount point.
For instance, to create a single node testnet:
Example:
This example builds a linux tendermint binary under the `build/` folder, creates tendermint configuration for a single-node validator and runs the node:
docker run -v `pwd`/build:/tendermint tendermint/localnode
```
Logging
@ -34,7 +84,3 @@ Special binaries
----------------
If you have multiple binaries with different names, you can specify which one to run with the BINARY environment variable. The path of the binary is relative to the attached volume.
docker-compose.yml
==================
This file creates a 4-node network using the localnode image. The nodes of the network are exposed to the host machine on ports 46656-46657, 46659-46660, 46661-46662, 46663-46664 respectively.