Consolidate docker checks

This commit is contained in:
Ryan Hughes committed 2025-10-27 00:23:29 -04:00
1 parent c2d62eddd6
commit e400a65fe4
4 files changed
+32 -45

No files matched your search

+21
View File
@@ -36,3 +36,24 @@ print_header() {
echo -e "${BOLD}$1${NC}"
echo -e "${BOLD}================================${NC}"
}
# Check Docker is available and running
check_docker() {
if ! command -v docker &>/dev/null; then
print_error "Docker is not installed"
exit 1
fi
if ! docker info &>/dev/null; then
print_error "Docker daemon is not running"
print_warning "Start Docker with: sudo systemctl start docker"
exit 1
fi
}
# Build the Docker image if needed
build_docker_image() {
local build_dir="$1"
print_info "Building Docker image..."
docker build -t omarchy-aur-builder:latest -f "$build_dir/Dockerfile" "$build_dir"
}