mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 20:09:34 +00:00
* feat(docker): replace Packer snapshots with Docker-based agent delivery Docker images on GHCR are public and cross-account, unlike DO snapshots which are private/account-scoped. Cloud-init installs Docker + pulls the agent image during boot. The install step extracts pre-built binaries via `docker cp` and falls back to normal install if unavailable. - Add Dockerfiles for all 7 agents (claude, codex, openclaw, opencode, kilocode, zeroclaw, hermes) - Convert docker.yml to matrix build for all agents - Add tryInstallFromDocker() shared helper with Docker-first install - Add Docker pull to DigitalOcean cloud-init userdata - Remove Packer snapshot pipeline, lookup, and SSH-only wait - Remove packer/ directory (HCL templates, tier scripts, agents.json) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * security: address review findings in docker agent delivery - Add agentName validation regex (/^[a-z0-9-]+$/) in digitalocean.ts before interpolation into cloud-init script - Quote dockerImage variable in all docker command strings in agent-setup.ts to prevent command injection - Restrict docker cp to specific known directories (.claude, .bun, .local, .npm, .cargo, .opencode) instead of blanket /root/. Agent: pr-maintainer Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
28 lines
1 KiB
Docker
28 lines
1 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Base packages
|
|
RUN apt-get update -y && \
|
|
apt-get install -y --no-install-recommends \
|
|
curl git ca-certificates unzip && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# OpenCode — download latest release binary
|
|
RUN OC_ARCH=$(uname -m) && \
|
|
case "$OC_ARCH" in aarch64) OC_ARCH=arm64;; x86_64) OC_ARCH=x64;; esac && \
|
|
OC_OS=$(uname -s | tr A-Z a-z) && \
|
|
mkdir -p /tmp/opencode-install /root/.opencode/bin && \
|
|
curl --proto '=https' -fsSL -o /tmp/opencode-install/oc.tar.gz \
|
|
"https://github.com/sst/opencode/releases/latest/download/opencode-${OC_OS}-${OC_ARCH}.tar.gz" && \
|
|
tar xzf /tmp/opencode-install/oc.tar.gz -C /tmp/opencode-install && \
|
|
mv /tmp/opencode-install/opencode /root/.opencode/bin/ && \
|
|
rm -rf /tmp/opencode-install
|
|
|
|
# Ensure tools are on PATH for all shells
|
|
RUN for rc in /root/.bashrc /root/.zshrc; do \
|
|
grep -q '.opencode/bin' "$rc" 2>/dev/null || \
|
|
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> "$rc"; \
|
|
done
|
|
|
|
CMD ["/bin/sleep", "inf"]
|