{"slug": "claude-docker-one-command-one-container-full-permissions", "title": "claude-docker: one command, one container, full permissions", "summary": "A developer created claude-docker, a one-command install script that runs Claude Code inside a Docker container with full permissions but limited filesystem access. The script builds a minimal image with Claude Code and the rtk CLI, then sets up shell aliases to launch the container with --dangerously-skip-permissions while mounting only the current project directory, reducing risk compared to running on the bare host.", "body_md": "If you've ever wanted to run [Claude Code](https://claude.com/product/claude-code) with full permissions, without worrying about it touching anything outside your project. This one-liner install script does exactly that.\n\nThe script builds a minimal Docker image (`node:22-slim`\n\n) with Claude Code and the `rtk`\n\nCLI pre-installed, then wires up two shell aliases:\n\n— launches Claude Code inside the container with`claude-docker`\n\n`--dangerously-skip-permissions`\n\n, your current directory mounted at`/workspace`\n\n— drops you into a bash shell in the same container, useful for poking around or debugging`claude-docker-sh`\n\nBecause everything runs inside the container, \"skip permissions\" mode is much less risky than running it on your bare host — Claude can act freely, but it's boxed into the container's filesystem plus whatever you've explicitly mounted.\n\nUnder the hood, the install script just appends two `docker run`\n\none-liners to your shell rc file as aliases — no separate binary, no PATH changes, just plain shell aliasing. That's what makes `claude-docker`\n\nand `claude-docker-sh`\n\navailable as regular commands once the file is sourced.\n\nThe image itself starts from `node:22-slim`\n\nand installs `git`\n\n, `curl`\n\n, and `gh`\n\nvia apt, then `@anthropic-ai/claude-code`\n\nvia npm, plus the `rtk`\n\nCLI through its own install script. It also creates a dedicated non-root `claudeuser`\n\nto run as, rather than executing everything as root inside the container.\n\nDocker needs to be installed and running first — the script builds an image and everything else depends on that.\n\nTwo versions are available depending on your shell:\n\n**bash:**\n\n```\ncurl -s https://gist.githubusercontent.com/acashjos/93f47fce263dcaaa1cd5ba38b4459ffb/raw/5944ef120f150ca08287d406ff3397a6687b871f/claude-docker-install-bash.sh | sh\n```\n\n**zsh:**\n\n```\ncurl -s https://gist.githubusercontent.com/acashjos/93f47fce263dcaaa1cd5ba38b4459ffb/raw/5944ef120f150ca08287d406ff3397a6687b871f/claude-docker-install-zsh.sh | sh\n```\n\nOr download it first, review it, then run:\n\n```\ncurl -O https://gist.githubusercontent.com/acashjos/93f47fce263dcaaa1cd5ba38b4459ffb/raw/5944ef120f150ca08287d406ff3397a6687b871f/claude-docker-install-bash.sh\nchmod +x claude-docker-install-bash.sh\n./claude-docker-install-bash.sh\n```\n\nThe script builds the image, appends the aliases to your `.bashrc`\n\n(or `.zshrc`\n\n), and sources the file so they're available immediately.\n\nFrom any project directory:\n\n```\nclaude-docker\n```\n\nThis mounts your current working directory into the container and starts Claude Code with all permissions granted. On first run, use the `/login`\n\ncommand inside Claude Code to complete authentication.\n\nNeed a plain shell in the same environment instead?\n\n```\nclaude-docker-sh\n```\n\nRunning Claude Code with `--dangerously-skip-permissions`\n\non a bare host means it can read, write, or execute anything your user account can. Wrapping it in Docker with only `$HOME/.claude-docker`\n\nand your project directory mounted keeps the blast radius contained to those two paths — a reasonable middle ground between full manual approval and full autonomy.\n\nFull source and both shell variants: [gist.github.com/acashjos/93f47fce263dcaaa1cd5ba38b4459ffb](https://gist.github.com/acashjos/93f47fce263dcaaa1cd5ba38b4459ffb)", "url": "https://wpnews.pro/news/claude-docker-one-command-one-container-full-permissions", "canonical_source": "https://dev.to/rogue_paradigms/claude-docker-one-command-one-container-full-permissions-34e4", "published_at": "2026-07-26 02:21:20+00:00", "updated_at": "2026-07-26 02:31:08.136040+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models", "ai-safety"], "entities": ["Claude Code", "Docker", "Anthropic", "rtk CLI"], "alternates": {"html": "https://wpnews.pro/news/claude-docker-one-command-one-container-full-permissions", "markdown": "https://wpnews.pro/news/claude-docker-one-command-one-container-full-permissions.md", "text": "https://wpnews.pro/news/claude-docker-one-command-one-container-full-permissions.txt", "jsonld": "https://wpnews.pro/news/claude-docker-one-command-one-container-full-permissions.jsonld"}}