Skip to content

Commit

Permalink
the docker inside circleCI does not support --rm (and no need)
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Oct 8, 2015
1 parent f2ac011 commit e653fd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ IMAGENAME="$OWNER/$NAME"
TAG='' && [ -n "$1" ] && TAG=":$1" && shift

CMD1="docker build -t ${IMAGENAME}${TAG} ."
CMD2="docker run --rm --name $NAME ${IMAGENAME}${TAG} test"

if [ -n "$CIRCLECI" ]
then
CMD2="docker run ${IMAGENAME}${TAG} test"
else
CMD2="docker run --rm --name $NAME ${IMAGENAME}${TAG} test"
fi

echo ">> Run $CMD1"
$CMD1
Expand Down

0 comments on commit e653fd3

Please sign in to comment.