Created
November 16, 2017 09:19
-
-
Save yogeek/e53e9d2e5113d6bac9f24696c62aceb0 to your computer and use it in GitHub Desktop.
Docker : Find dependent child images
This file contains hidden or 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
# In case "docker rmi" displaying the following message : | |
# Error response from daemon: conflict: unable to delete 599a1a74e98d (cannot be forced) - image has dependent child images | |
IMAGE_ID=xxxx | |
for i in $(docker images -q) | |
do | |
docker history $i | grep -q $IMAGE_ID && echo $i | |
done | sort -u | |
# Then "docker rmi" the resulted images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment