Support rootless Podman builds
This commit is contained in:
8 files changed
+198
-78
No files matched your search
+13
-7
@@ -1,21 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Clean Docker builder images and cache
|
||||
# Clean builder images and cache for the selected container engine
|
||||
# Forces a fresh image build on next run
|
||||
|
||||
set -e
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
source "$BUILD_ROOT/helpers/message-helpers.sh"
|
||||
source "$BUILD_ROOT/helpers/docker-helpers.sh"
|
||||
|
||||
print_header "Cleaning Docker Builder Images"
|
||||
check_engine
|
||||
print_header "Cleaning Container 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
|
||||
"$CONTAINER_ENGINE" images omarchy-pkg-builder -q | xargs -r "$CONTAINER_ENGINE" rmi -f 2>/dev/null || true
|
||||
|
||||
# Clear buildx cache for these builds
|
||||
print_info "Clearing buildx cache..."
|
||||
docker buildx prune -a -f
|
||||
# Clear this engine's build cache.
|
||||
print_info "Clearing build cache..."
|
||||
if [[ "$CONTAINER_ENGINE" == "docker" ]]; then
|
||||
"$CONTAINER_ENGINE" buildx prune -a -f
|
||||
else
|
||||
"$CONTAINER_ENGINE" image prune --build-cache -f
|
||||
fi
|
||||
|
||||
print_success "Docker builder cache cleared"
|
||||
print_success "Container builder cache cleared"
|
||||
print_info "Next build will create fresh images"
|
||||
Reference in new issue
Block a user