#!/usr/bin/env bash

set -euo pipefail

# Color constants
CYAN='\033[0;36m'
NC='\033[0m' # No Color

# Script inputs
kraken_base_version="${1:-bazel-0.25.2-base-kraken-clean-image}"

container_tag="kraken.docker.zooxlabs.com/base-kraken-clean-image:${kraken_base_version}"
docker_dir="$ZOOX_WORKSPACE_ROOT/kraken/clean-kraken"

printf "${CYAN}[Initiating Kraken builder]${NC}\n"
docker build --tag "${container_tag}" "${docker_dir}"

printf "\n${CYAN}[Pushing tentacle to registry]${NC}\n"
docker push "${container_tag}"
