You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
650 B

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=$2
  5. cd $GOPATH/src/github.com/tendermint/tendermint
  6. # create docker network
  7. docker network create --driver bridge --subnet 172.57.0.0/16 $NETWORK_NAME
  8. N=4
  9. seeds="172.57.0.101:46656"
  10. for i in `seq 2 $N`; do
  11. seeds="$seeds,172.57.0.$((100+$i)):46656"
  12. done
  13. echo "Seeds: $seeds"
  14. for i in `seq 1 $N`; do
  15. # start tendermint container
  16. docker run -d \
  17. --net=$NETWORK_NAME \
  18. --ip=172.57.0.$((100+$i)) \
  19. --name local_testnet_$i \
  20. --entrypoint tendermint \
  21. -e TMROOT=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$i/core \
  22. $DOCKER_IMAGE node --seeds $seeds --proxy_app=dummy
  23. done