sha256:cf35ed99c3c3e925349d11d548396dbcd1eff0190cf78f64b55077165625f1d3
Last pushed
16 days by docker
Type
Sandbox Kit
Manifest digest
sha256:cf35ed99c3c3e925349d11d548396dbcd1eff0190cf78f64b55077165625f1d3
schemaVersion: "2"
kind: mixin
name: agentic-platform
version: 0.0.0-c51aea36937c
displayName: Agentic Platform Sandbox
description: 'Invariant agentic-platform sandbox payload: Go binaries, helper scripts, coordination guide pages, gh/git proxy config, and system setup. Layered as a mixin over docker/sandbox-templates:shell-docker.'
sourceURL: https://github.com/docker/agentic-platform/tree/main/docker/sandbox-kit
setup:
install:
- command: |
set -eu
mkdir -p /workspace && chown agent:agent /workspace
mkdir -p /home/agent/workspace && chown agent:agent /home/agent/workspace
mkdir -p /extra-repos && chown agent:agent /extra-repos
chmod 1777 /run
touch /var/log/sandbox-proxy.log \
/var/log/ssh-agent-shim.log
chown agent:agent \
/var/log/sandbox-proxy.log \
/var/log/ssh-agent-shim.log
user: "0"
description: 'Create /workspace, /home/agent/workspace (APT-1212: the interactive session workspace, unconditionally present even for project-less interactive sessions that never clone a repo there), and /extra-repos (all agent-owned), make /run sticky-writable (1777), and pre-create agent-owned log files under /var/log/ (needed by proxy and ssh-agent-shim).'
- command: |
set -eu
MISSING=""
command -v sshd >/dev/null 2>&1 || MISSING="${MISSING} openssh-server"
dpkg -s libpam-modules >/dev/null 2>&1 || MISSING="${MISSING} libpam-modules"
if [ -n "${MISSING}" ]; then
for attempt in 1 2 3; do
if apt-get update -q; then
break
fi
if [ "${attempt}" -eq 3 ]; then
echo "apt-get update failed after 3 attempts" >&2
exit 1
fi
sleep 3
done
# shellcheck disable=SC2086
apt-get install -y --no-install-recommends ${MISSING}
rm -rf /var/lib/apt/lists/*
fi
user: "0"
description: Assert openssh-server and libpam-modules are present; install only if missing (apt-get is a no-op when packages already exist). websocat is baked into ~/.ap/libexec at build-context time (APT-999), not curled here. Deliberately does NOT assert tmux — SSH logins spawn a plain login shell, no multiplexer (APT-510).
- command: |
set -eu
if ! command -v glab >/dev/null 2>&1; then
GLAB_VERSION=1.108.0
GLAB_SHA256="cb3eb9d6b05eedef24a028b52354f12fb9a07ecfa0b5581eb161176585bc8213"
curl -fsSL -o /tmp/glab.tar.gz \
"https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/${GLAB_VERSION}/glab_${GLAB_VERSION}_linux_amd64.tar.gz"
echo "${GLAB_SHA256} /tmp/glab.tar.gz" | sha256sum -c -
tar -xzf /tmp/glab.tar.gz -C /tmp bin/glab
mv /tmp/bin/glab /usr/local/bin/glab
chmod +x /usr/local/bin/glab
rm -f /tmp/glab.tar.gz
rm -rf /tmp/bin
fi
user: "0"
description: Install the GitLab CLI (glab) at a pinned version with checksum verification; guarded by command -v glab so it is a no-op when already present (e.g. in the pre-baked image). The glab binary is the only GitLab-specific content baked into the image — all routing config (git insteadOf rules, glab host config) is written at provisioning time by the gitlabrepo provisioner, not baked here (APT-729 / GitLab integration design).
startup:
- command:
- sh
- -c
- chmod +x /home/agent/.ap/libexec/* || true
user: "0"
description: 'Fix execute bits on kit binaries: the v2 OCI packer hardcodes 0644, stripping the execute bit. chmod +x before the promote step ensures the promoted binaries in /usr/local/bin/ are executable.'
- command:
- sh
- -c
- |
set -eu
mkdir -p /usr/local/bin
cp -a /home/agent/.ap/libexec/. /usr/local/bin/
chown -R root:root /usr/local/bin
user: "0"
description: 'Promote Go binaries and helper scripts from ~/.ap/libexec to /usr/local/bin. Runs on both cold and warm paths (warm path via InjectKit SkipInstall=true). No tmux.conf to promote — the kit ships no tmux configuration (APT-510). The chown re-asserts root:root ownership: `cp -a src/. dest/` also copies src''s own directory metadata onto the pre-existing dest, so this overwrites /usr/local/bin''s ownership with the agent-owned ~/.ap/libexec''s. sshd''s AuthorizedKeysCommand requires both ap-authorized-keys and /usr/local/bin itself to be root-owned, or pubkey auth silently falls back to TOTP.'
- command:
- sh
- -c
- |
set -eu
mkdir -p /usr/local/share/ap-guides
cp -a /home/agent/.ap/ap-guides/. /usr/local/share/ap-guides/
user: "0"
description: Promote the coordination guide markdown pages from ~/.ap/ap-guides to /usr/local/share/ap-guides. Runs on both cold and warm paths (warm path via InjectKit SkipInstall=true), same as the libexec promote.