Skip to content
Permalink
e66c65af96
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
there
2 contributors

Users who have contributed to this file

@wgthom @mchyzer
executable file 35 lines (28 sloc) 908 Bytes
#! /bin/bash
if [ -z "$1" ]
then
#docker images tier/gte
echo "Pass in which gte environment to spin up:"
my_array=( $( docker images | grep 'tier/gte' | grep -v base | awk '{print $2}' | sort ) )
for i in "${my_array[@]}"
do
# strip last 7 chars (-202010)
i=${i::${#i}-7}
echo $i
done
exit 1
fi
# remove rabbitmq and all gte containers
docker rm -f rabbitmq 2> /dev/null
# see if there is a container
CONTAINER="$( docker ps -a | grep 'tier/gte' | awk '{print $1}' )"
# if so, then rm it
if [ ! -z "$CONTAINER" ]; then
docker ps -a | grep 'tier/gte' | awk '{print $1}' | xargs docker rm -f
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
$DIR/start-rabbitmq.sh
# lets see which
#docker stop "$1" 2> /dev/null
#docker rm "$1" 2> /dev/null
docker run -d -p 8443:443 --link rabbitmq:rabbitmq --name $1 tier/gte:"$1"-202010