#!/usr/bin/env bash # Build SilverBullet image on CachyOS base (run on koopa). # bash ~/koopa-admin-log/scripts/notes/build.sh set -euo pipefail ROOT="$(cd "$(dirname "$0")/../.." && pwd)" CTX="${ROOT}/configs/notes" TAG="${IMAGE_TAG:-localhost/koopa-silverbullet:cachyos}" SB_VERSION="${SB_VERSION:-2.10.0}" cd "$CTX" [[ -f Containerfile ]] || { echo "ERROR: missing $CTX/Containerfile" >&2; exit 1; } [[ -f entrypoint.sh ]] || { echo "ERROR: missing $CTX/entrypoint.sh" >&2; exit 1; } echo "build $TAG (SB_VERSION=$SB_VERSION) ctx=$CTX" podman build \ --build-arg "SB_VERSION=${SB_VERSION}" \ -t "$TAG" \ -f Containerfile \ . echo "OK: $TAG" podman image inspect "$TAG" --format '{{.Id}} {{.Size}} {{.Architecture}}' 2>/dev/null || true