peppa/scripts/runner-image.sh
Асель ca57f9543b PEP-17/40: agent sandbox per runner (docker + agent relay) and runner hosts over SSH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:57:28 +05:00

18 lines
784 B
Bash
Executable File

#!/usr/bin/env bash
# PEP-17/40: builds the runner image (infra/runner) and, with --push <host…>, loads it on runner
# hosts over SSH (docker save | ssh host docker load) with Peppa's key.
# Versions of the agents: CLAUDE_CODE_VERSION / CODEX_VERSION / OPENCODE_VERSION (default latest).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
IMAGE="${PEPPA_RUNNER_IMAGE:-peppa/runner:latest}"
docker build -t "$IMAGE" \
--build-arg CLAUDE_CODE_VERSION="${CLAUDE_CODE_VERSION:-latest}" \
--build-arg CODEX_VERSION="${CODEX_VERSION:-latest}" \
--build-arg OPENCODE_VERSION="${OPENCODE_VERSION:-latest}" \
"$ROOT/infra/runner"
echo "built $IMAGE"
if [[ "${1:-}" == "--push" ]]; then
shift
for h in "$@"; do "$ROOT/packages/cli/bin/peppa" host push-image "$h"; done
fi