mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-15 19:56:11 +00:00
Error #1: ``` Error response from daemon: network with name local_testnet already exists ``` Fixed by stopping and removing local_testnet containers and removing the network Error #2: ``` docker: Error response from daemon: Conflict. The name "/test_container_basic" is already in use by container a7cd15d479a964675e7f259de4ed852e7dfef85b447514728f437cd0b980a709. You have to remove (or rename) that container to beable to reuse that name.. ``` Fixed by adding `--rm` flag.
19 lines
423 B
Bash
19 lines
423 B
Bash
#! /bin/bash
|
|
set -eu
|
|
|
|
DOCKER_IMAGE=$1
|
|
NETWORK_NAME=$2
|
|
ID=$3
|
|
CMD=$4
|
|
|
|
echo "starting test client container with CMD=$CMD"
|
|
# run the test container on the local network
|
|
docker run -t --rm \
|
|
-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") \
|
|
--name test_container_$ID \
|
|
--entrypoint bash \
|
|
$DOCKER_IMAGE $CMD
|
|
|