Last active
February 15, 2026 16:43
-
-
Save SabatinoMasala/2ce46fc06b3234ccddfde242832904e1 to your computer and use it in GitHub Desktop.
Use Claude Code max plan with Docker sandbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM docker/sandbox-templates:claude-code | |
| USER root | |
| # ... Install extra dependencies | |
| # Wrap claude binary to ensure onboarding is marked complete before launch, make sure the host exposes CLAUDE_CODE_OAUTH_TOKEN as an environment variable (get it using claude setup-token) | |
| RUN CLAUDE_PATH=$(which claude) \ | |
| && mv "$CLAUDE_PATH" "${CLAUDE_PATH}.real" \ | |
| && printf '#!/bin/bash\ntest -f /home/agent/.claude.json || echo "{}" > /home/agent/.claude.json\njq ".hasCompletedOnboarding = true" /home/agent/.claude.json > /tmp/.claude.json && mv /tmp/.claude.json /home/agent/.claude.json\nexec "%s.real" "$@"\n' "$CLAUDE_PATH" > "$CLAUDE_PATH" \ | |
| && chmod +x "$CLAUDE_PATH" | |
| USER agent |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting a token
On your host, run:
Follow the instructions and export this environment variable in your
~/.zshrcRestart Docker desktop to make sure it loads the environment variables.
Build the sandbox image
Run the sandbox, this will now be authenticated