Skip to content

Instantly share code, notes, and snippets.

@AdnaneX
Forked from TheMoroccan09/docker-clear.sh
Created October 13, 2018 03:12
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 AdnaneX/1a206aea6808bfe8a1d10b403f9946b2 to your computer and use it in GitHub Desktop.
Save AdnaneX/1a206aea6808bfe8a1d10b403f9946b2 to your computer and use it in GitHub Desktop.
#!bin/bash
DOCKER_PIDS=$(docker ps -a -q)
if [ -n "$DOCKER_PIDS" ]; then
docker stop $DOCKER_PIDS && docker rm $DOCKER_PIDS
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment