Add docker cleaner

This commit is contained in:
Ryan Hughes
2026-01-10 20:36:21 -05:00
parent 45a356eb70
commit fb5b71d209
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# Clean Docker builder images and cache
# Forces a fresh image build on next run
set -e
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
source "$BUILD_ROOT/helpers/message-helpers.sh"
print_header "Cleaning Docker Builder Images"
# Remove all omarchy-pkg-builder images
print_info "Removing omarchy-pkg-builder images..."
docker images omarchy-pkg-builder -q | xargs -r docker rmi -f 2>/dev/null || true
# Clear buildx cache for these builds
print_info "Clearing buildx cache..."
docker buildx prune -a -f
print_success "Docker builder cache cleared"
print_info "Next build will create fresh images"