Sign inSign up

docker/ai-factory-sandbox:kit-sha-e9e063ad8766

Manifest digest

sha256:9be5d05865bd49447969772ea616443b8368eca486f35120240226fecc3abb12

Last pushed

about 15 hours by docker

Type

Sandbox Kit

Manifest digest

sha256:9be5d05865bd49447969772ea616443b8368eca486f35120240226fecc3abb12

yaml
schemaVersion: "2"
kind: mixin
name: agentic-platform
version: 0.0.0-e9e063ad8766
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
            git config --system --unset-all url."http://localhost:9989/".insteadOf 2>/dev/null || true
            git config --system --add url."http://localhost:9989/".insteadOf "https://github.com/"
            git config --system --add url."http://localhost:9989/".insteadOf "[email protected]:"
            git config --system --add url."http://localhost:9989/".insteadOf "ssh://[email protected]/"
          user: "0"
          description: 'Write git --system insteadOf rules so every GitHub URL is routed through the local sandbox proxy at localhost:9989. Idempotent: safe to run repeatedly (retries, or double-application) without accumulating duplicate or conflicting values.'
        - 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).