Implement better message without using trap
@@ -7,4 +7,8 @@ DEVDIR=/tmp/concourse-dev
DBDIR=$DEVDIR/db
docker_postgres="${DOCKER_POSTGRES:-concourse-db}"
+if [ $(docker ps --filter name=${docker_postgres} | grep -c ${docker_postgres}) = 0 ] ; then
exec docker run --rm --name ${docker_postgres} -p 127.0.0.1:${POSTGRES_PORT:-6543}:5432 -d postgres:alpine "$@"
+else
+ echo "Docker container ${docker_postgres} is already up and running"
+fi
