Skip to content

Instantly share code, notes, and snippets.

@52cik
Last active October 6, 2023 12:39
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 52cik/5d32fcd7471633b848f8dc9a0e4281cc to your computer and use it in GitHub Desktop.
Save 52cik/5d32fcd7471633b848f8dc9a0e4281cc to your computer and use it in GitHub Desktop.
docker 镜像批量更新
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