tendermint/test/p2p/client.sh

20 lines
442 B
Bash
Raw Normal View History

2016-07-24 11:08:47 -07:00
#! /bin/bash
set -eu
DOCKER_IMAGE=$1
NETWORK_NAME=$2
ID=$3
CMD=$4
2016-07-24 11:08:47 -07:00
2016-12-22 17:50:13 -08:00
NAME=test_container_$ID
echo "starting test client container with CMD=$CMD"
2016-07-24 11:08:47 -07:00
# run the test container on the local network
docker run -t --rm \
2017-03-06 00:08:04 -08:00
-v "$GOPATH/src/github.com/tendermint/tendermint/test/p2p/:/go/src/github.com/tendermint/tendermint/test/p2p" \
--net="$NETWORK_NAME" \
--ip=$(test/p2p/ip.sh "-1") \
2017-03-06 00:08:04 -08:00
--name "$NAME" \
2016-07-24 11:08:47 -07:00
--entrypoint bash \
2017-03-06 00:08:04 -08:00
"$DOCKER_IMAGE" $CMD