summaryrefslogtreecommitdiff
path: root/tcwg-start-container.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-02-10 18:30:02 +0300
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-02-10 18:30:55 +0300
commitbed581c4be7b3dba3afc93a2ffaee6aa74fbc2ff (patch)
tree16e230e910efd4c099c728f882ad7c3d757fd554 /tcwg-start-container.sh
parente2196e583a850d75ea64c4b9cdbfc3755295484a (diff)
tcwg-start-container.sh: Reduce container downtime
... by first downloading the image, and then restarting the container. Change-Id: I2193bdfed21e06bb6d4165efb7b9746552622000
Diffstat (limited to 'tcwg-start-container.sh')
-rwxr-xr-xtcwg-start-container.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcwg-start-container.sh b/tcwg-start-container.sh
index 36a64137..ca7b5d91 100755
--- a/tcwg-start-container.sh
+++ b/tcwg-start-container.sh
@@ -15,6 +15,8 @@ set -u
if $verbose; then set -x; fi
+docker pull "$image"
+
if docker stats --no-stream $container >/dev/null 2>&1; then
if $keep_existing; then
exit 0
@@ -22,8 +24,6 @@ if docker stats --no-stream $container >/dev/null 2>&1; then
docker rm -vf $container
fi
-docker pull "$image"
-
docker run --rm $image start.sh > start.sh
bash start.sh "$@"