Skip to content

Instantly share code, notes, and snippets.

@megahertz
Last active January 14, 2026 09:48
Show Gist options
  • Select an option

  • Save megahertz/5d213f5e5ba4d4de7a95494621d8e734 to your computer and use it in GitHub Desktop.

Select an option

Save megahertz/5d213f5e5ba4d4de7a95494621d8e734 to your computer and use it in GitHub Desktop.
There's a `docker sandbox run claude` command, but it requires Docker Desktop to be installed, which is pretty undesirable on Linux since it replaces Docker Engine with a VM environment. This simple script does similar things.
#!/usr/bin/env bash
docker run --init -it --rm \
-v "$(pwd):$(pwd)" -w "$(pwd)" \
-v "$HOME/.claude:/home/agent/.claude" \
-v "$HOME/.claude.json:/home/agent/.claude.json" \
-e GIT_AUTHOR_NAME="$(git config user.name)" \
-e GIT_AUTHOR_EMAIL="$(git config user.email)" \
-e TERM=xterm-256color \
-e COLORTERM=truecolor \
docker/sandbox-templates:claude-code "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment