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