Last active
June 28, 2022 14:12
-
-
Save mlhoutel/cb811da804bb7f0a6bedc3af7ba37955 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@echo off | |
:: Stop all containers | |
for /f "tokens=*" %%i in ('docker ps -q') do docker kill %%i | |
:: Remove all containers | |
for /f "tokens=*" %%i in ('docker ps -a -q') do docker rm %%i | |
:: Remove all images | |
for /f "tokens=*" %%i in ('docker images -q') do docker rmi %%i | |
:: Remove all networks | |
docker network prune | |
:: Remove all volumes | |
docker volume prune | |
:: Volumes from docker-compose up must be removed with: | |
:: docker-compose down --rmi all --volumes | |
:: ... in the same directory as the Dockerfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment