Last active
May 3, 2020 20:11
-
-
Save johndatserakis/0002d9aded5778f9d0589a23ce1e08d4 to your computer and use it in GitHub Desktop.
Bash command to clean unused docker images and solve the max depth exceeded error.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Getting a "max depth exceeded" error in your docker-compose file? Run these commands to clean our your docker install. | |
# Stop all running containers | |
docker stop $(docker ps -aq) | |
# Delete all docker containers | |
docker rm $(docker ps -a -q) | |
# Delete all docker images | |
docker rmi $(docker images -q) | |
# All commands at once | |
docker stop $(docker ps -aq) && docker rm $(docker ps -a -q) && docker rmi $(docker images -q) | |
# docker-compose down and removing volumes | |
docker-compose down -v --remove-orphans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment