Skip to content

Instantly share code, notes, and snippets.

@pgwillia
Last active August 25, 2020 22:27
Show Gist options
  • Save pgwillia/a4b9488f5093b4ba52bef296e586be92 to your computer and use it in GitHub Desktop.
Save pgwillia/a4b9488f5093b4ba52bef296e586be92 to your computer and use it in GitHub Desktop.
docker

To blow it all away and start fresh:

docker system prune -a

WARNING! This will remove:
	- all stopped containers
	- all volumes not used by at least one container
	- all networks not used by at least one container
	- all images without at least one container associated to them
@pgwillia
Copy link
Author

Procedure

Stop the container(s) using the following command:

`docker-compose down`

Delete all containers using the following command:

`docker rm -f $(docker ps -a -q)`

Delete all volumes using the following command:

`docker volume rm $(docker volume ls -q)`

Restart the containers using the following command:

`docker-compose up -d`

@pgwillia
Copy link
Author

docker-compose down -v is likely all that's need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment