build: fix docker setup (#337)

* fix: issue #310

- add ip-addresses for localnet-setup generation
- add localnet-setup folder to keep localnet-setup-artifacts
- map localnet-setup-artifacts to containers
- change start-docker.sh to pick up generated testnet artifacts

* feat: get rid of explicit ip-address-assignments for containers

* feat: get rid of docker-localnet, introduce localnet-build and localnet-show-logstream, fix localnet-unsafe-reset and localnet-clean, add comments

* fix: add --no-cache on docker build, exclude build-directory
This commit is contained in:
Simon Pfeifhofer
2021-08-04 09:30:13 +00:00
committed by GitHub
parent 396db9f20a
commit 300af0df0e
8 changed files with 49 additions and 65 deletions
+5 -22
View File
@@ -1,29 +1,12 @@
#!/bin/bash
KEY="mykey"
CHAINID="ethermint-123"
MONIKER="mymoniker"
DATA_DIR=$(mktemp -d -t ethermint-datadir.XXXXX)
echo "create and add new keys"
./ethermintd keys add $KEY --home $DATA_DIR --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
./ethermintd init $MONIKER --chain-id $CHAINID --home $DATA_DIR
echo "prepare genesis: Allocate genesis accounts"
./ethermintd add-genesis-account \
"$(./ethermintd keys show $KEY -a --home $DATA_DIR --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
--home $DATA_DIR --keyring-backend test
echo "prepare genesis: Sign genesis transaction"
./ethermintd gentx $KEY 1000000000000000000stake --keyring-backend test --home $DATA_DIR --keyring-backend test --chain-id $CHAINID
echo "prepare genesis: Collect genesis tx"
./ethermintd collect-gentxs --home $DATA_DIR
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
./ethermintd validate-genesis --home $DATA_DIR
./ethermintd validate-genesis --home /ethermint
echo "starting ethermint node $i in background ..."
./ethermintd start --pruning=nothing --rpc.unsafe \
--keyring-backend test --home $DATA_DIR \
>$DATA_DIR/node.log 2>&1 & disown
echo "starting ethermint node $ID in background ..."
./ethermintd start \
--home /ethermint \
--keyring-backend test
echo "started ethermint node"
tail -f /dev/null