Skip to content

Instantly share code, notes, and snippets.

@jazzwang
Last active August 29, 2015 14:21
Show Gist options
  • Save jazzwang/7b5b13cd52d715fe7abf to your computer and use it in GitHub Desktop.
Save jazzwang/7b5b13cd52d715fe7abf to your computer and use it in GitHub Desktop.
Docker Tricks (1) : update your local docker images from registry and remove old images
#!/bin/bash
for i in $(docker images | grep ago | awk '{ print $1":"$2 }'); do docker pull $i; done
for i in $(docker images -f 'dangling=true' -q); do docker rmi $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment