Skip to content

Instantly share code, notes, and snippets.

@xueruini
Last active March 31, 2017 07:59
Show Gist options
  • Save xueruini/bc2808b7f7bb98c72702bc9965e079ff to your computer and use it in GitHub Desktop.
Save xueruini/bc2808b7f7bb98c72702bc9965e079ff to your computer and use it in GitHub Desktop.
shell snippets
# update all docker images
docker images | tail -n +2 | awk '{printf "%s:%s\n", $1, $2}' | xargs -n 1 docker pull
# cleanup untagged images
docker images | grep "^<none>" | awk '{print $3}' | xargs -n 1 docker rmi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment