sha256:350fc0d24374a7934410ab64224a317f1182f1ad56cb630ed0a5c9429667a3a4
Last pushed
about 1 month by timaebi
Type
Sandbox Kit
Manifest digest
sha256:350fc0d24374a7934410ab64224a317f1182f1ad56cb630ed0a5c9429667a3a4
schemaVersion: "2"
kind: sandbox
name: claude-floor4
displayName: Claude Code DEV Sandbox
description: |
Claude Code sandbox with Java, Node.js, Python 3,
GitLab CLI (glab) configured for gitlab.com,
Argo CD CLI (argocd) configured for argocd.i.floor4.ch and
the context7 plugin from Anthropic's official plugin marketplace
All credentials stay on the host: the sbx proxy injects them into outbound
requests and no secret is stored in the image or this kit file. The argocd CLI
cannot use the proxy on its own (argo-cd#23933), so setup.startup runs a small
gRPC-Web shim on localhost that forwards its calls through the proxy.
extends: claude
sandbox:
image: registry.gitlab.com/floor4/infra/infra/claude-docker:latest
agentInstructions:
content: |
## Sandbox toolchain
- **`glab`** — GitLab CLI configured for gitlab.com
- **`kubectl`** — Kubernetes CLI. No kubeconfig ships with the image; mount or
create one, and make sure the cluster API endpoint is on the network allowlist.
- **`argocd`** — Argo CD CLI, already pointed at floor4's Argo CD via a baked
`~/.config/argocd/config`. No login step is needed.
- **`nvm`** — Node Version Manager, installed system-wide in `/usr/local/nvm` and
sourced for login, interactive and non-interactive shells. No Node version is
managed by nvm out of the box — the system Node is used until you run
`nvm install --lts`. Installed versions are shared by all users of the sandbox.
### GitLab CLI usage
Authentication is handled transparently by the sandbox proxy.
You do not need to run `glab auth login` or configure a token manually.
Use `glab` to interact with GitLab and not `gh` as the projects are hosted on a self-hosted GitLab.
Common commands:
```
glab repo clone <namespace>/<project>
glab mr list
glab issue create --title "..." --description "..."
glab pipeline list
```
### Argo CD CLI usage
No token exists in this sandbox and none is needed. The CLI is pointed at a
local gRPC-Web shim (`127.0.0.1:8090`, started by the kit) which forwards
every call through the sbx proxy, and the proxy attaches the credential on
the host. Just run the commands — do not run `argocd login`, do not pass
`--server`, and do not try to set `ARGOCD_AUTH_TOKEN` (it holds the usual
`proxy-managed` sentinel, not a usable token).
Applications live in per-project namespaces, so most commands need the
qualified `<namespace>/<name>` shown by `argocd app list`
(e.g. `telemetry-thanos/thanos`), not the bare name.
Access is the read-only `viewer` account, so `sync`, `rollback`, `delete`
and `app exec` come back as PermissionDenied.
Common commands:
```
argocd app list
argocd app get <namespace>/<app>
argocd app manifests <namespace>/<app>
argocd app logs <namespace>/<app> --tail 200
argocd cluster list
argocd account can-i sync applications '*/*'
```
**Reading logs.** `argocd app logs --tail N` works normally. Follow mode
(`-f`) does NOT stream: the gateway holds the response and flushes it in one
batch when its 15 s route timeout fires, then ends the stream. For live
tailing use the REST API instead, which streams correctly and gets the same
credential injection:
```
curl -sN "https://argocd.i.floor4.ch/api/v1/applications/<app>/logs\
?namespace=<ns>&appNamespace=<ns>&follow=true&tailLines=50"
```
The whole REST API is available to `curl` this way (`/api/v1/applications`,
`/api/v1/session/userinfo`, ...) and is often easier to parse than CLI output.
If a command reports `Unauthenticated: no session information`, the shim is
not running. Restart it with:
```
/usr/local/bin/argocd-grpcweb-shim.py &
```
permissions:
network:
allow:
- api.anthropic.com
- console.anthropic.com
- claude.com
- statsigapi.net
- mcp.context7.com
- github.com
- codeload.github.com
- registry.npmjs.org
- nodejs.org
- pypi.org
- files.pythonhosted.org
- repo1.maven.org
- search.maven.org
- plugins.gradle.org
- services.gradle.org
- api.foojay.io
- '*.floor4.ch'
- argocd-grpc.i.floor4.ch
- argocd.i.floor4.ch
- gitlab.com
- registry.gitlab.com
- '*.angular.dev'
- angular.dev
credentials:
- service: context7
apiKey:
name: CONTEXT7_API_KEY
proxyManaged: true
inject:
- domain: mcp.context7.com
header: CONTEXT7_API_KEY
format: '%s'
- service: gitlab
apiKey:
name: GITLAB_TOKEN
proxyManaged: true
inject:
- domain: gitlab.com
header: PRIVATE-TOKEN
format: '%s'
- service: argocd
description: Argo CD API token for k8s-wil (read-only `viewer` account)
apiKey:
name: ARGOCD_AUTH_TOKEN
proxyManaged: true
inject:
- domain: argocd-grpc.i.floor4.ch
header: Authorization
format: Bearer %s
- domain: argocd.i.floor4.ch
header: Authorization
format: Bearer %s
setup:
install:
- command: |
set -eu
findmnt -rno TARGET | grep '^/home/agent/\.claude/' | while read -r target; do
find "$target" -path "$target/lost+found" -prune -o -exec chown agent:agent {} +
done
user: "0"
description: Give the agent user ownership of the mounted ~/.claude state volumes
- command: |
git config --global "http.https://gitlab.com/.extraHeader" "Authorization: Basic proxy-managed-basic"
user: "1000"
description: Configure git HTTP extra-header for GitLab proxy auth
startup:
- command:
- claude
- plugin
- install
- context7@claude-plugins-official
user: "1000"
description: Install and enable the context7 plugin from the official marketplace
- command:
- /usr/local/bin/argocd-grpcweb-shim.py
user: "1000"
background: true
description: Start the Argo CD gRPC-Web shim so the argocd CLI can use the proxy