Last active
October 6, 2023 12:39
-
-
Save 52cik/5d32fcd7471633b848f8dc9a0e4281cc to your computer and use it in GitHub Desktop.
docker 镜像批量更新
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
for i in $( docker images --format "{{.Repository}}:{{.Tag}}" ) | |
do | |
docker pull $i | |
done | |
# or | |
# docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull | |
docker image prune -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment