From 425305142142f1f01719f7830fa44fdb776e2672 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 9 Sep 2016 20:14:58 -0700 Subject: [PATCH] Add RUNARGS and BUILDARGS for more flexibility E.g. RUNARGS="--rm" or BUILDARGS="--no-cache". --- docker/launch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/launch.sh b/docker/launch.sh index 022c60f25..129e4c6f0 100755 --- a/docker/launch.sh +++ b/docker/launch.sh @@ -33,7 +33,8 @@ for build in $BUILDS; do command="git clone --recursive https://github.com/$FORK/PowerShell -b $BRANCH; $command" fi # run Pester tests inside container - docker run --rm -it powershell/powershell:$build-$distro -c "$command" + # RUNARGS can be set in the environment + docker run -it $RUNARGS powershell/powershell:$build-$distro -c "$command" else echo "Building $image" # copy the common script because it lives outside the docker build context @@ -42,7 +43,8 @@ for build in $BUILDS; do buildargs="--build-arg fork=$FORK --build-arg branch=$BRANCH" fi # build and tag the image so they can be derived from - docker build $buildargs -t powershell/powershell:$build-$distro $distro + # BUILDARGS can be set in the environment + docker build $buildargs $BUILDARGS -t powershell/powershell:$build-$distro $distro fi done cd ..