#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." REGISTRY="${REGISTRY:-registry.niovi.voyage}" IMAGE_NAME="${IMAGE_NAME:-harb/integration}" TAG="${TAG:-latest}" FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}" echo "Building integration image: ${FULL_IMAGE}" echo "This may take 5-10 minutes on first build..." # Build kraiken-lib first (required by the image) echo "=== Building kraiken-lib ===" ./scripts/build-kraiken-lib.sh # Build the integration image echo "=== Building Docker image ===" docker build \ -f docker/Dockerfile.integration \ -t "${FULL_IMAGE}" \ --progress=plain \ . echo "" echo "✓ Image built successfully: ${FULL_IMAGE}" echo "" echo "To test locally:" echo " docker run --rm --privileged -p 8081:8081 ${FULL_IMAGE}" echo "" echo "To push to registry:" echo " docker push ${FULL_IMAGE}"