Skip to content

Instantly share code, notes, and snippets.

@pecavalheiro
Created January 9, 2017 17:06
Show Gist options
  • Select an option

  • Save pecavalheiro/bb44f6d60e4d4d6153cd8bf36f7494bd to your computer and use it in GitHub Desktop.

Select an option

Save pecavalheiro/bb44f6d60e4d4d6153cd8bf36f7494bd to your computer and use it in GitHub Desktop.

Revisions

  1. pecavalheiro created this gist Jan 9, 2017.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # remove exited container.
    docker ps -a|grep Exit|cut -d' ' -f 1|xargs docker rm
    # remove images as possible that has no name/tag
    docker images -a|grep '^<none>'|tr -s ' '|cut -d' ' -f 3|xargs docker rmi