Skip to content

Instantly share code, notes, and snippets.

@miku
Last active November 9, 2015 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miku/6041642fa4597388be89 to your computer and use it in GitHub Desktop.
Save miku/6041642fa4597388be89 to your computer and use it in GitHub Desktop.
Docker shortcuts

Docker Shortcuts

# absolutely positively remove all images
# via: https://forums.docker.com/t/command-to-remove-all-unused-images/20/4
$ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")

# remove all containers
# via: http://linuxconfig.org/how-to-remove-all-docker-containers-using-a-single-command
$ docker rm `docker ps -qa`

# stop all containers
# via: https://coderwall.com/p/ewk0mq/stop-remove-all-docker-containers
docker stop $(docker ps -a -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment