Files
homelab/k8s/dev-tools/build.sh
T
Story Crater Bot e1d0cfd70b k8s/aux: add cert-manager longhorn dashboard forge dev-tools and shadowsocks
- cert-manager ClusterIssuers (LetsEncrypt + homelab-ca)
- Longhorn storage dashboard
- Portainer dashboard config
- Forgejo git service
- Claude terminal remote access
- Shadowsocks tunnel for remote access
2026-07-11 19:19:59 -07:00

25 lines
762 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
REGISTRY="forgejo.riotpiao.homelab.com"
IMAGE_NAME="rock/claude-terminal"
TAG="latest"
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
echo "🔨 Building Claude Terminal image for linux/amd64..."
docker buildx build --platform linux/amd64 \
-t "${FULL_IMAGE}" \
-f Dockerfile \
. || { echo "❌ Build failed"; exit 1; }
echo "🔓 Logging in to Forgejo registry..."
REGISTRY_TOKEN=$(talos get cluster/iam/agents/ci-bot --key token)
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" \
--username ci-bot \
--password-stdin || { echo "❌ Login failed"; exit 1; }
echo "📤 Pushing image to registry..."
docker push "${FULL_IMAGE}" || { echo "❌ Push failed"; exit 1; }
echo "✅ Successfully pushed ${FULL_IMAGE}"