Skip to content

Instantly share code, notes, and snippets.

@Tarliton
Created February 24, 2020 17:55
Show Gist options
  • Save Tarliton/8d3b0debacc7abd69b8025eb37664658 to your computer and use it in GitHub Desktop.
Save Tarliton/8d3b0debacc7abd69b8025eb37664658 to your computer and use it in GitHub Desktop.
docker commands
# update docker images
docker images | awk '{if(NR>1)print $1 ":" $2}' | xargs -n1 docker pull
# remove dangling images
docker images | grep none | awk '{print $3}' | xargs docker rmi
@tarlitongodoy
Copy link

Remove exited containers

docker ps -a | grep Exited | awk '{print $1}' | xargs docker rm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment