2026-04-14 20:11:24 +02:00
|
|
|
services:
|
|
|
|
|
# ─── Proxy sidecar ─────────────────────────────────────────────────────────
|
|
|
|
|
# Bridges the isolated internal network to the internet.
|
|
|
|
|
# Enforces an egress allowlist — see proxy/squid.conf.
|
|
|
|
|
proxy:
|
2026-04-15 21:19:33 +02:00
|
|
|
image: registry.zeidler.dev/docker-public/playground/docker-claude-proxy:${IMAGE_TAG:-latest}
|
2026-04-14 20:11:24 +02:00
|
|
|
networks:
|
2026-04-15 21:59:08 +02:00
|
|
|
- claude-internal # reachable by claude container
|
2026-04-14 22:40:57 +02:00
|
|
|
- proxy-external # has outbound internet access
|
2026-04-14 20:11:24 +02:00
|
|
|
restart: unless-stopped
|
|
|
|
|
security_opt:
|
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
cap_drop:
|
|
|
|
|
- ALL
|
|
|
|
|
read_only: true
|
|
|
|
|
tmpfs:
|
|
|
|
|
- /tmp
|
2026-04-14 22:40:57 +02:00
|
|
|
- /var/cache/squid
|
2026-04-14 20:11:24 +02:00
|
|
|
- /var/log/squid
|
|
|
|
|
|
2026-04-14 22:25:38 +02:00
|
|
|
# ─── Claude Code CLI container ─────────────────────────────────────────────
|
2026-04-14 20:11:24 +02:00
|
|
|
# No direct internet access. All egress routes through the proxy sidecar.
|
2026-04-14 22:47:04 +02:00
|
|
|
# Run via "docker compose run --rm --service-ports claude" (managed by claude.sh).
|
2026-04-14 20:11:24 +02:00
|
|
|
claude:
|
2026-04-15 21:19:33 +02:00
|
|
|
image: registry.zeidler.dev/docker-public/playground/docker-claude-claude:${IMAGE_TAG:-latest}
|
2026-04-14 20:11:24 +02:00
|
|
|
depends_on:
|
|
|
|
|
proxy:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
networks:
|
2026-04-14 22:40:57 +02:00
|
|
|
- claude-internal # only — no route to the internet
|
2026-04-14 20:11:24 +02:00
|
|
|
environment:
|
2026-04-14 22:47:04 +02:00
|
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
|
|
|
- CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN:-}
|
2026-04-14 20:11:24 +02:00
|
|
|
- HTTP_PROXY=http://proxy:3128
|
|
|
|
|
- HTTPS_PROXY=http://proxy:3128
|
|
|
|
|
- ALL_PROXY=http://proxy:3128
|
|
|
|
|
- NO_PROXY=localhost,127.0.0.1
|
2026-04-20 15:32:29 +02:00
|
|
|
# MCP server credentials — all optional; servers are skipped if unset
|
|
|
|
|
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
|
|
|
|
|
- GITLAB_TOKEN=${GITLAB_TOKEN:-}
|
|
|
|
|
- GITLAB_URL=${GITLAB_URL:-https://gitlab.com}
|
|
|
|
|
- ATLASSIAN_SITE_NAME=${ATLASSIAN_SITE_NAME:-}
|
|
|
|
|
- ATLASSIAN_USER_EMAIL=${ATLASSIAN_USER_EMAIL:-}
|
|
|
|
|
- ATLASSIAN_API_TOKEN=${ATLASSIAN_API_TOKEN:-}
|
2026-04-14 22:47:04 +02:00
|
|
|
ports:
|
|
|
|
|
# OAuth callback — required for browser-based login (claude login)
|
|
|
|
|
- "0.0.0.0:54545:54545"
|
|
|
|
|
volumes:
|
2026-04-15 21:19:33 +02:00
|
|
|
- ${HOME}/.claude:/home/node/.claude
|
2026-04-15 08:10:44 +02:00
|
|
|
# Workspace is injected by claude.sh via --volume flag at run time (current directory).
|
2026-04-14 20:11:24 +02:00
|
|
|
security_opt:
|
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
cap_drop:
|
|
|
|
|
- ALL
|
|
|
|
|
stdin_open: true
|
|
|
|
|
tty: true
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
# Internal-only: Docker adds no default gateway → no direct internet route
|
|
|
|
|
claude-internal:
|
|
|
|
|
driver: bridge
|
|
|
|
|
internal: true
|
|
|
|
|
|
|
|
|
|
# External: standard bridge with internet access (proxy only)
|
|
|
|
|
proxy-external:
|
|
|
|
|
driver: bridge
|
2026-04-14 22:25:38 +02:00
|
|
|
|