summaryrefslogtreecommitdiff
path: root/tcwg-start-container.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-03-22 08:40:25 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-03-22 14:30:51 +0000
commit8f2393f9dfbbbcfac8bda35e279fd0024d0092c6 (patch)
tree8e1c6cb96cd155a336f158eca538cf7f29b30405 /tcwg-start-container.sh
parent28611f0a7c709c885c1e92fcee677a9cdc6b9480 (diff)
start-container-docker.sh: Move workaround for dockerhub's limits
... to dockerfiles.git/tcwg-base/tcwg-host/docker-wrapper . Our workaround to dockerhub's pull limits in start-container-docker.sh works well, but with one exception -- it doesn't properly work when container is started on a remote host, which we do a lot in tcwg-benchmark-* jobs. To solve this we migrate workaround logic to docker wrapper script, and add a new docker command for it -- "maybepull". Change-Id: I131f1adc56052164a76c5dfaf9d07a4d2f24ec43
Diffstat (limited to 'tcwg-start-container.sh')
-rwxr-xr-xtcwg-start-container.sh16
1 files changed, 0 insertions, 16 deletions
diff --git a/tcwg-start-container.sh b/tcwg-start-container.sh
index cc9b040b..88e3253e 100755
--- a/tcwg-start-container.sh
+++ b/tcwg-start-container.sh
@@ -17,21 +17,8 @@ set -u
if $verbose; then set -x; fi
-# See start-container-docker.sh for background on image stamp files.
-# Note that there is no need to track pull requests, since these happen
-# once a day anyway.
-stamp_dir=/home/shared/docker
-if ! [ -d "$stamp_dir" ]; then
- sudo mkdir -p "$stamp_dir" || mkdir -p "$stamp_dir"
- sudo chmod 0777 "$stamp_dir" || chmod 0777 "$stamp_dir"
-fi
-image_stamp="$stamp_dir/$(echo "$image" | tr "/:" "_")"
-
docker pull "$image"
-rm -f "$image_stamp.pull"
-touch "$image_stamp.pull"
-
rm_cnt=""
if docker stats --no-stream "$container" >/dev/null 2>&1; then
case "$keep_existing" in
@@ -65,9 +52,6 @@ docker run --rm $image start.sh > "$start_sh"
bash "$start_sh" "$@"
rm "$start_sh"
-rm -f "$image_stamp.use"
-touch "$image_stamp.use"
-
if [ x"$rm_cnt" != x"" ]; then
# With the new container started delete the old one.
# Note that if both old and new containers need an exclusive resource