Sign inSign up

sbx/antigravity-mixin:latest

Multi-platform
Manifest digest

sha256:9d22213b57f156f92ec3d11275d42c2d3a3c6cbc5d2666d655afab48bd45d89c

Last pushed

about 10 hours by dhibot

Type

Sandbox Kit

Manifest digest

sha256:9d22213b57f156f92ec3d11275d42c2d3a3c6cbc5d2666d655afab48bd45d89c

yaml
schemaVersion: "3"
displayName: Google Antigravity (mixin)
author: Docker, Inc. https://docker.com
description: Google Antigravity CLI overlay for a shell workload, with Gemini credentials and MCP setup.
sourceUrl: https://github.com/docker-hardened-images/definitions
version: 1.5.9
licenses:
    - LicenseRef-Proprietary
kind: mixin
provides:
    - [email protected]
requires:
    - deb/jq
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        runtime:
            allow:
                - accounts.google.com:443
                - oauth2.googleapis.com:443
                - www.googleapis.com:443
                - lh3.googleusercontent.com:443
                - aicode.googleapis.com:443
                - cloudcode-pa.googleapis.com:443
                - daily-cloudcode-pa.googleapis.com:443
                - generativelanguage.googleapis.com:443
                - antigravity.google:443
                - antigravity.google.com:443
                - antigravity-unleash.goog:443
                - play.googleapis.com:443
                - safebrowsing.googleapis.com:443
                - www.gstatic.com:443
                - antigravity-cli-auto-updater-974169037036.us-central1.run.app:443
                - storage.googleapis.com:443
                - raw.githubusercontent.com:443
    - type: com.docker.sandbox/credential@1
      optional: true
      config:
        apiKey:
            inject:
                - domain: generativelanguage.googleapis.com
                  format: '%s'
                  header: x-goog-api-key
            name: GEMINI_API_KEY
            proxyManaged: true
        phase: runtime
        service: google
      description: Gemini API key for Antigravity's headless API-key mode
    - type: com.docker.sandbox/lifecycle@1
      config:
        startup:
            - command: |
                set -e
                cfg="$HOME/.gemini/antigravity-cli/settings.json"
                mkdir -p "$(dirname "$cfg")"
                [ -s "$cfg" ] || echo '{}' > "$cfg"
                if [ "${SBX_CRED_GOOGLE_MODE:-none}" = apikey ]; then
                  jq '.modelProvider = "gemini"' "$cfg" > "$cfg.tmp"
                else
                  jq 'del(.modelProvider)' "$cfg" > "$cfg.tmp"
                fi
                mv "$cfg.tmp" "$cfg"
              description: Select Gemini API-key mode only when a Google credential is available
              env:
                - SBX_CRED_GOOGLE_MODE
              user: "1000"
            - command: |
                set -e
                [ -n "$MCP_GATEWAY_URL" ] || exit 0
                cfg="$HOME/.gemini/config/mcp_config.json"
                mkdir -p "$(dirname "$cfg")"
                [ -s "$cfg" ] || echo '{}' > "$cfg"
                frag=/tmp/antigravity-mcp-gateway.json
                cat > "$frag" <<EOF
                {
                  "mcpServers": {
                    "mcp-gateway": {
                      "serverUrl": "$MCP_GATEWAY_URL",
                      "headers": {
                        "Authorization": "Bearer $MCP_SENTINEL_TOKEN_NAME"
                      }
                    }
                  }
                }
                EOF
                jq -s '.[0] * .[1]' "$cfg" "$frag" > "$cfg.tmp"
                mv "$cfg.tmp" "$cfg"
                rm -f "$frag"
              description: Register the sandbox MCP gateway in Antigravity's user configuration
              env:
                - MCP_GATEWAY_URL
                - MCP_SENTINEL_TOKEN_NAME
              user: "1000"
    - type: com.docker.sandbox/agent-context@1
      optional: true
      config:
        content: |
            # Google Antigravity

            Google's Antigravity agent is available in this sandbox as `agy`. Run it from
            the shell — this kit is a mixin, so the sandbox's launch command belongs to
            whatever workload it was layered onto.

            Authentication has two modes and the sandbox picks between them for you: with
            a Google credential bound, `GEMINI_API_KEY` carries a sentinel the egress
            proxy swaps for the real key at Google's endpoints, and a startup hook sets
            `modelProvider: gemini` in `~/.gemini/antigravity-cli/settings.json`. With
            nothing bound, that key is removed and `agy` falls back to its interactive
            Google sign-in.

            Egress is limited to Google's own hosts plus Antigravity's product and update
            hosts, so a tool that reaches anywhere else will be refused by the sandbox
            rather than by the agent.
        directory: /home/agent
        filename: AGENTS.md
    - type: com.docker.sandbox/agent-context@2
      optional: true
      config:
        content: |
            # Google Antigravity

            Google's Antigravity agent is available in this sandbox as `agy`. Run it from
            the shell — this kit is a mixin, so the sandbox's launch command belongs to
            whatever workload it was layered onto.

            Authentication has two modes and the sandbox picks between them for you: with
            a Google credential bound, `GEMINI_API_KEY` carries a sentinel the egress
            proxy swaps for the real key at Google's endpoints, and a startup hook sets
            `modelProvider: gemini` in `~/.gemini/antigravity-cli/settings.json`. With
            nothing bound, that key is removed and `agy` falls back to its interactive
            Google sign-in.

            Egress is limited to Google's own hosts plus Antigravity's product and update
            hosts, so a tool that reaches anywhere else will be refused by the sandbox
            rather than by the agent.
        directory: /home/agent
        filename: AGENTS.md
    - type: com.docker.sandbox/acp@1
      optional: true
      config:
        agent: antigravity
        command:
            - agy
            - acp
            - --dangerously-skip-permissions
args:
    version:
        required: true
        description: Antigravity CLI version asserted after installation
        pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
        buildArg: VERSION