claude-container

Run Claude Code in a Docker container with network isolation and tmux persistence.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/karohani/my-claude-friends --skill claude-container
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-container
Source: https://github.com/karohani/my-claude-friends/tree/main/plugins/claude-container/skills/claude-container
Command: npx skills add https://github.com/karohani/my-claude-friends --skill claude-container

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Provides a secure, dockerized runtime for Claude Code that isolates execution from the host environment and simplifies environment setup.

Core Features & Use Cases

  • Automatic .devcontainer generation for reproducible development environments
  • Network isolation via firewall rules to restrict external access
  • OAuth credential injection into the container on macOS
  • tmux session support to keep Claude processes alive after detaching
  • Deterministic container naming based on the project path
  • Command-based lifecycle management (run, list, stop, clean)

Quick Start

Start the Docker-based Claude Code environment for your project using the claude-container tool.

Frequently Asked Questions about claude-container

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Claude Code in a Docker container safely?

You can run Claude Code in an isolated Docker container using a tool that automatically generates a .devcontainer, applies firewall network isolation, and manages the execution lifecycle to provide a safe, sandboxed environment.

Can I isolate Claude Code network access with firewall rules in a devcontainer?

Yes, you can isolate network access by running Claude Code in a Docker container that implements firewall-based network isolation, restricting external access to protect your host environment during testing and execution.

Does Claude Code sandboxing work with OAuth credential injection on macOS?

Yes, Docker-based Claude Code sandboxing supports OAuth credential injection into the container on macOS, allowing you to authenticate and run processes securely without exposing credentials to the host.

How do I keep Claude Code processes alive after detaching from a Docker session?

Keep Claude Code processes alive after detaching by using tmux session support within the Docker container, ensuring your sandboxed execution persists in the background even when you disconnect from the session.

What is the best way to manage reproducible Docker environments for Claude Code?

The best way to manage reproducible Docker environments for Claude Code is using a tool with automatic .devcontainer creation, deterministic container naming based on the project path, and command-based lifecycle management.

When do I need a sandboxed execution environment for Claude Code?

You need a sandboxed execution environment for Claude Code when you are a software developer seeking reproducible environments for experiments, testing, and isolated execution across multiple projects without risking your host system.