mirror of https://gerrit.osmocom.org/osmo-ci
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
This commit is contained in:
parent
a7df704d4d
commit
21a641d6c2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue