github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/test/p2p/client.sh (about) 1 #! /bin/bash 2 set -eu 3 4 DOCKER_IMAGE=$1 5 NETWORK_NAME=$2 6 IPV=$3 7 ID=$4 8 CMD=$5 9 10 NAME=test_container_$ID 11 12 if [[ "$IPV" == 6 ]]; then 13 IP_SWITCH="--ip6" 14 else 15 IP_SWITCH="--ip" 16 fi 17 18 echo "starting test client container with CMD=$CMD" 19 # run the test container on the local network 20 docker run -t --rm \ 21 -v "$PWD/test/p2p/:/go/src/github.com/tendermint/tendermint/test/p2p" \ 22 --net="$NETWORK_NAME" \ 23 $IP_SWITCH=$(test/p2p/address.sh $IPV -1) \ 24 --name "$NAME" \ 25 --entrypoint bash \ 26 "$DOCKER_IMAGE" $CMD