Created
October 3, 2022 14:17
-
-
Save tbnorth/676de940034a4284e65ff2dec8253d81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix ERROR: readlink /data/docker/overlay2/l/7M5EN7M5OUETAW42LC63NZBNJA: no such file or directory errors | |
docker image ls | while read row; do | |
image_id=$(echo $row | sed -E 's/^(\S+\s+){2}(\S+).*/\2/') | |
docker inspect --format='{{.GraphDriver.Data.MergedDir}}' $image_id || \ | |
(echo -e "Broken image:\n$row"; echo docker image rm $image_id) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment