Skip to content

Instantly share code, notes, and snippets.

@nezl
Created February 22, 2019 14:53
Show Gist options
  • Select an option

  • Save nezl/67f48e0161d7a945c2da1614e244a688 to your computer and use it in GitHub Desktop.

Select an option

Save nezl/67f48e0161d7a945c2da1614e244a688 to your computer and use it in GitHub Desktop.
#!/bin/sh
# stop running containers
for i in `docker container ls -q`; do
echo "stopping container $i"
docker container stop "$i";
done
for i in `docker container ls -aq`; do
echo "removing container $i"
docker container rm "$i";
done
docker system prune -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment