Skip to content

Instantly share code, notes, and snippets.

@dido18
Last active November 5, 2016 10:18
Show Gist options
  • Save dido18/1e31b1b59b0d7f2e80fb29aa665ef362 to your computer and use it in GitHub Desktop.
Save dido18/1e31b1b59b0d7f2e80fb29aa665ef362 to your computer and use it in GitHub Desktop.
Script bash for deleting all the images and the containers.
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# Delete allthe servicex (Docke swarm mode)
docker service ls -q | xargs docker service rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment