This commit is contained in:
19
tests/clear-cache.sh
Executable file
19
tests/clear-cache.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Clearing Docker build cache..."
|
||||
|
||||
# Clear the build cache
|
||||
docker builder prune -af
|
||||
|
||||
# Optional: Also clear dangling images and containers
|
||||
echo "Cleaning up dangling images and stopped containers..."
|
||||
docker system prune -f
|
||||
|
||||
echo "Build cache cleared successfully!"
|
||||
|
||||
# Show disk usage after cleanup
|
||||
echo ""
|
||||
echo "Docker disk usage after cleanup:"
|
||||
docker system df
|
Reference in New Issue
Block a user