Claude Code Docker Container Demo — DevOps skill for Claude Code
在網路受限的 Docker 容器(Dev Container)中安全執行 Claude Code 的沙箱範本:透過 iptables/ipset 防火牆白名單限制對外連線,隔離 AI Agent 的讀寫與執行.
How to install Claude Code Docker Container Demo
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open deancourse/claude-code-docker-container-demo and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Docker Container Demo does
在網路受限的 Docker 容器(Dev Container)中安全執行 Claude Code 的沙箱範本:透過 iptables/ipset 防火牆白名單限制對外連線,隔離 AI Agent 的讀寫與執行。改自 Anthropic 官方 .devcontainer。
Alternatives in DevOps
- Claude Code Router — Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the m 30.1k ★
- Claude Code GitHub Actions — by Anthropic - Official GitHub Actions integration for Claude Code with examples and documentation for automat 6.4k ★
- Claude Proxy — 这是一个部署在 Cloudflare Workers 上的 TypeScript 项目,它充当一个代理服务器,能够将 Claude API 格式的请求无缝转换为 OpenAI API 格式 214 ★
README
Claude Code Docker 沙箱(Dev Container)
在一個**網路受限的 Docker 容器**裡執行 [Claude Code](https://docs.anthropic.com/en/docs/claude-code),讓 AI Agent 可以在隔離環境中讀寫程式碼、執行指令,同時透過防火牆把對外連線限制在少數白名單網域,降低資料外洩與誤操作的風險。
本專案改自 Anthropic 官方的 `.devcontainer` [參考實作](https://github.com/anthropics/claude-code/tree/main/.devcontainer)。
目錄結構
.
├── .devcontainer/
│ ├── devcontainer.json # Dev Container 設定(映像、掛載、環境變數、啟動指令)
│ ├── Dockerfile # 容器映像:Node 20 + 開發工具 + Claude Code CLI
│ └── init-firewall.sh # 啟動時套用的 iptables/ipset 防火牆規則
├── .claude/
│ └── settings.local.json # 專案層級的本機設定(權限白名單等)
└── README.md
需求
- Docker(Desktop 或 Engine)
- IDE: VS Code、Cursor、Antigravity
- 透過 Extensions 安裝 Dev Containers
快速開始
- 用 IDE 開啟此資料夾。
- 按
F1→Dev Containers: Reopen in Container。 - 第一次會建置映像(image)並執行
init-firewall.sh套用防火牆,請稍候。 - 容器開好後,在整合終端機執行:
claude - 依照指示完成登入即可開始使用。
你的程式碼透過 bind mount 掛載在容器內的 `/workspace`,在容器內的修改會直接反映到本機檔案。
這個容器裡有什麼
由
Related Skills
3do Dev
Modern 3DO Interactive Multiplayer dev kit: Norcroft toolchain in Docker, patched Opera emulator with GDB serv
Deploy To Azure
Deploy DevContainer environment to Azure Container Apps for cloud-based development
Architecture Container Secret Cmdline Leak Fix
Use when: (1) a secret like ANTHROPIC_API_KEY is passed to a container via -e VAR=value on a podman/docker run
Claude Container
A secure Docker container for running Claude Code (Anthropic's agentic coding tool) in isolation, with awesome
Claude In Box
Portable Claude Code dev environment in a Docker container — multi-session, hook-driven, web-managed, with tra
AI Dev Container
devc creates isolated, sandboxed Docker containers for AI coding agents (Claude Code, Codex, Gemini CLI, Openc
Related Agents
Devcontainer Analyzer
Collect repository facts for a devcontainer (stacks, runtime versions, package managers, services the code use
Docker CI Debugger
Use this agent when you need to troubleshoot Docker-in-Docker (DinD) configurations in CI pipelines, debug Tes
Developer Overview
code-container (container) creates isolated Docker environments for AI coding harnesses (Claude Code, OpenCode