osmith submitted this change.
scripts/docker-cleanup: remove fallback code
Remove the fallback clean up code, as it also may lead to images getting
removed right before we need to use them. Besides that, it should be
dead code by now since docuum should be running on all our jenkins nodes
to clean up old images based on last use date.
Change-Id: I9ca0c2ba245bdd75d9fb8eaf341055e8c2ab1b55
---
M scripts/docker-cleanup.sh
1 file changed, 0 insertions(+), 9 deletions(-)
diff --git a/scripts/docker-cleanup.sh b/scripts/docker-cleanup.sh
index 4d8241b..fe134d2 100755
--- a/scripts/docker-cleanup.sh
+++ b/scripts/docker-cleanup.sh
@@ -1,15 +1,6 @@
#!/bin/sh -x
# https://osmocom.org/projects/osmocom-servers/wiki/Docker_cache_clean_up
-# simple image cleaning code in case docuum isn't running
-# delete all but the latest images
-if [ -z "$(docker ps -q -f name=docuum)" ]; then
- IMAGES=`docker image ls | grep \^osmocom-build | grep -v latest | awk -F ' ' '{print $1":"$2}'`
- for f in $IMAGES; do
- docker image rm $f
- done
-fi
-
# delete all containers where we forgot to use --rm with docker run,
# older than 24 hours
docker container prune --filter "until=24h" -f
To view, visit change 30526. To unsubscribe, or for help writing mail filters, visit settings.