Created
August 8, 2023 13:38
-
-
Save kostapc/a5272201aba06024e72fcbd9917c6426 to your computer and use it in GitHub Desktop.
Cleanup docker env for free space
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
# also avoid "Docker environment should have more than 2GB free disk space" error | |
Write-Host "stopping all dockers" -ForegroundColor DarkRed | |
docker stop $(docker ps -a -q) | |
Write-Host "removing all docker" -ForegroundColor DarkRed | |
docker rm $(docker ps -a -q) | |
Write-Host "===================" -ForegroundColor DarkRed | |
Write-Host "performing docker system prune" -ForegroundColor DarkRed | |
docker system prune --volumes -f | |
docker ps -a | |
Write-Host "docker-clean done" -ForegroundColor DarkRed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment