Claude Code isolated inside Docker with dmenu and fzf (POSIX sh)
Claude Code can now be run inside a Docker container using a lightweight shell wrapper called claude-cli. This setup ensures that the host system remains clean while allowing configuration persistence across sessions. Users can choose different modes for running Claude, including options for single or multiple directory selections.
- ▪claude-cli is a shell wrapper that runs Claude Code inside a Docker container.
- ▪Users can select modes for running Claude, including options for no directory, single directory, or multiple directories.
- ▪The configuration for Claude is persistently stored and bind-mounted into the container on every run.
Opening excerpt (first ~120 words) tap to expand
claude-cli A lightweight shell wrapper that runs Claude Code inside a Docker container, keeping your host system clean while persisting your Claude configuration across sessions. Requirements Docker with Buildx plugin dmenu — mode selection prompt fzf — directory picker Current user must be a member of the docker group Installation git clone https://github.com/shirozuki/claude-cli chmod +x claude-cli/claude-cli.sh ln -s "$PWD/claude-cli/claude-cli.sh" ~/.local/bin/claude-cli Usage claude-cli [-b] [-c] [-h] Option Description -b Build (or rebuild) the claude-cli:latest Docker image -c Remove all claude-cli containers; optionally remove the image -h Show help Running without any option launches a dmenu prompt to choose a mode.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.