Skip to content

Instantly share code, notes, and snippets.

@swcho
Last active April 28, 2017 06:54
Show Gist options
  • Save swcho/1fde11ad651d977122dff5320b62aa0a to your computer and use it in GitHub Desktop.
Save swcho/1fde11ad651d977122dff5320b62aa0a to your computer and use it in GitHub Desktop.
Docker Commands
#!/bin/bash
# http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
#!/bin/bash
# https://coderwall.com/p/zguz_w/docker-remove-all-exited-containers
docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment