Skip to content

Instantly share code, notes, and snippets.

@generalistcodes
Forked from evanscottgray/docker_kill.sh
Created June 30, 2022 07:30
Show Gist options
  • Select an option

  • Save generalistcodes/546947b0bb14882d7044bcb252ab6ab9 to your computer and use it in GitHub Desktop.

Select an option

Save generalistcodes/546947b0bb14882d7044bcb252ab6ab9 to your computer and use it in GitHub Desktop.

Revisions

  1. @evanscottgray evanscottgray revised this gist Jan 23, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion docker_kill.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    for line in $(docker ps | awk {' print $1 '} | tail -n+2); do docker kill $line; done
    docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
  2. @evanscottgray evanscottgray created this gist Jan 23, 2014.
    1 change: 1 addition & 0 deletions docker_kill.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    for line in $(docker ps | awk {' print $1 '} | tail -n+2); do docker kill $line; done