## Description
add make build-linux into `make build-docker` it is not documented that the cmd depends on the build folder so this aids in helping the user.
Closes: #XXX
Note the binary will be mounted into the container so it can be updated without
rebuilding the image.
```
cd $GOPATH/src/github.com/tendermint/tendermint
```sh
# Build the linux binary in ./build
make build-linux
@ -34,7 +32,7 @@ make build-docker-localnode
To start a 4 node testnet run:
```
```sh
make localnet-start
```
@ -48,9 +46,8 @@ on ports 26656-26657, 26659-26660, 26661-26662, and 26663-26664 respectively.
To update the binary, just rebuild it and restart the nodes:
```
```sh
make build-linux
make localnet-stop
make localnet-start
```
@ -62,31 +59,46 @@ 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.
To change the number of validators / non-validators change the `localnet-start` Makefile target:
To change the number of validators / non-validators change the `localnet-start` Makefile target [here](../../makefile):
```
```sh
localnet-start: localnet-stop
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/tendermint:Z tendermint/localnode testnet --v 5 --n 3 --o . --populate-persistent-peers --starting-ip-address 192.167.10.2 ; fi
docker-compose up
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/tendermint:Z tendermint/localnode testnet --v 5 --n 3 --o . --populate-persistent-peers --starting-ip-address 192.167.10.2 ; fi
docker-compose up
```
The command now will generate config files for 5 validators and 3
non-validators network.
Before running it, don't forget to cleanup the old files:
non-validators. Along with generating new config files the docker-compose file needs to be edited.
Adding 4 more nodes is required in order to fully utilize the config files that were generated.
```yml
node3: # bump by 1 for every node
container_name: node3 # bump by 1 for every node
image: "tendermint/localnode"
environment:
- ID=3
- LOG=${LOG:-tendermint.log}
ports:
- "26663-26664:26656-26657" # Bump 26663-26664 by one for every node
volumes:
- ./build:/tendermint:Z
networks:
localnet:
ipv4_address: 192.167.10.5 # bump the final digit by 1 for every node
```
cd $GOPATH/src/github.com/tendermint/tendermint
Before running it, don't forget to cleanup the old files:
```sh
# Clear the build folder
rm -rf ./build/node*
```
## Configuring abci containers
## Configuring ABCI containers
To use your own abci applications with 4-node setup edit the [docker-compose.yaml](https://github.com/tendermint/tendermint/blob/master/docker-compose.yml) file and add image to your abci application.
To use your own ABCI applications with 4-node setup edit the [docker-compose.yaml](https://github.com/tendermint/tendermint/blob/master/docker-compose.yml) file and add image to your ABCI application.
```
```yml
abci0:
container_name: abci0
image: "abci-image"
@ -133,9 +145,9 @@ To use your own abci applications with 4-node setup edit the [docker-compose.yam
```
Override the [command](https://github.com/tendermint/tendermint/blob/master/networks/local/localnode/Dockerfile#L12) in each node to connect to it's abci.
Override the [command](https://github.com/tendermint/tendermint/blob/master/networks/local/localnode/Dockerfile#L12) in each node to connect to it's ABCI.