-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-push.sh
More file actions
executable file
·36 lines (31 loc) · 1003 Bytes
/
build-push.sh
File metadata and controls
executable file
·36 lines (31 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Build the AgentBox image and push to ghcr.io/networg/agentbox.
# Run once (or after Dockerfile changes) before spawning containers.
#
# Usage:
# ./build-push.sh
# AGENTBOX_IMAGE=ghcr.io/networg/agentbox:v2 ./build-push.sh
set -euo pipefail
AGENTBOX_IMAGE="${AGENTBOX_IMAGE:-ghcr.io/networg/agentbox:latest}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "🔨 Building AgentBox image..."
echo " Image: $AGENTBOX_IMAGE"
echo ""
# Ensure a buildx builder exists
docker buildx inspect agentbox-builder &>/dev/null || \
docker buildx create --name agentbox-builder --use --bootstrap
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag "$AGENTBOX_IMAGE" \
--push \
"$SCRIPT_DIR"
echo ""
echo "✅ Pushed: $AGENTBOX_IMAGE"
echo ""
echo "To spawn locally:"
echo " export AGENTBOX_IMAGE=$AGENTBOX_IMAGE"
echo " export GH_TOKEN=\$(gh auth token)"
echo " ./agentbox spawn"
echo ""
echo "To spawn on Azure:"
echo " ./agentbox spawn --azure"