diff --git a/doc/dev.rst b/doc/dev.rst index 4a3f53284..73d5e84a6 100644 --- a/doc/dev.rst +++ b/doc/dev.rst @@ -253,12 +253,6 @@ fail or that won’t give you additional information, and not pushing every commit (CI tests only the most recent commit in a pushed group). Avoid making commits merely to trigger CI. -**Purging Docker cache.** :code:`misc/docker-clean.sh` can be used to purge -your Docker cache, either by removing all tags or deleting all containers and -images. The former is generally preferred, as it lets you update only those -base images that have actually changed (the ones that haven’t will be -re-tagged). - Issue labeling -------------- diff --git a/misc/Makefile.am b/misc/Makefile.am index 166b7871f..bd0d800a6 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = docker-clean.sh grep version +EXTRA_DIST = grep version diff --git a/misc/docker-clean.sh b/misc/docker-clean.sh deleted file mode 100755 index 23ea9321a..000000000 --- a/misc/docker-clean.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -# FIXME: Give up after a certain number of iterations. - -set -e - -# Remove all containers. -while true; do - cmd='sudo docker ps -aq' - cs_ct=$($cmd | wc -l) - echo "found $cs_ct containers" - [[ 0 -eq $cs_ct ]] && break - # shellcheck disable=SC2046 - sudo docker rm $($cmd) -done - -# Untag all images. This fails with: -# -# Error response from daemon: invalid reference format -# -# sometimes. I don’t know why. -if [[ $1 != --all ]]; then - while true; do - cmd='sudo docker images --filter dangling=false --format {{.Repository}}:{{.Tag}}' - tag_ct=$($cmd | wc -l) - echo "found $tag_ct tagged images" - [[ 0 -eq $tag_ct ]] && break - # shellcheck disable=SC2046 - sudo docker rmi -f --no-prune $($cmd) - done -fi - -# If --all specified, remove all images. -if [[ $1 = --all ]]; then - while true; do - cmd='sudo docker images -q' - img_ct=$($cmd | wc -l) - echo "found $img_ct images" - [[ 0 -eq $img_ct ]] && break - # shellcheck disable=SC2046 - sudo docker rmi -f $($cmd) - done -fi diff --git a/misc/loc b/misc/loc index eed3ce947..ea65399e7 100755 --- a/misc/loc +++ b/misc/loc @@ -283,7 +283,6 @@ find . -type f -a \( \ -path ./.gitattributes \ -o -path ./.gitignore \ -o -path ./VERSION \ - -o -path ./misc/docker-clean.sh \ -o -path ./misc/branches-tidy \ -o -path ./misc/grep \ -o -path ./misc/loc \) | sort > /tmp/loc.misc