Skip to content

Instantly share code, notes, and snippets.

@ttonyh
Created July 11, 2021 23:36
Show Gist options
  • Save ttonyh/73d7206d68478ed053e7df5a8471ca6c to your computer and use it in GitHub Desktop.
Save ttonyh/73d7206d68478ed053e7df5a8471ca6c to your computer and use it in GitHub Desktop.
Docker Utils
#!/usr/bin/env sh
while true; do
read -p "Are you sure you want to wipe out Docker containers? [y/N]: " yn
case $yn in
[Yy]* ) docker stop $(docker ps -a -q); docker rm $(docker ps -a -q); break;;
[Nn]* ) exit;;
* ) exit;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment