Skip to content

Run Claude Code in Docker

Running Claude Code in Docker provides isolation, reproducibility, and team consistency. SCC CLI makes this straightforward.

BenefitWhat It Means
IsolationAI execution separated from host system
ReproducibilitySame environment across all team members
Clean stateEach session starts fresh (or can resume)
Controlled accessOnly mounted directories are visible
Terminal window
# Docker Desktop 4.50+
brew install --cask docker
# Start Docker Desktop and ensure engine is running
# Python 3.10+
brew install python@3.12
# Git 2.30+
brew install git
Terminal window
# Install SCC CLI
uv tool install scc-cli
# Configure SCC (one-time setup)
scc setup
# Start Claude Code in Docker
scc start ~/your-project

That’s it. Claude Code now runs inside a Docker container with your project mounted.

When you run scc start, SCC:

  1. Creates a container based on configured image
  2. Mounts your workspace at a controlled path
  3. Applies team configuration (plugins, policies)
  4. Starts Claude Code inside the container
  5. Manages the session (resume, stop, cleanup)
┌─────────────────────────────────────┐
│ Your Machine │
│ │
│ ~/your-project │
│ │ │
│ ▼ (mounted read-write) │
│ ┌─────────────────────────────┐ │
│ │ Docker Container │ │
│ │ /workspace/your-project │ │
│ │ │ │
│ │ Claude Code runs here │ │
│ │ + Team plugins │ │
│ │ + Safety Net │ │
│ │ + Network policies │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘

By default, SCC mounts the directory you specify:

Terminal window
scc start ~/projects/my-app # Mounts ~/projects/my-app

If your organization has profiles configured:

Terminal window
scc start --team backend ~/project # Use backend team profile
scc start --team frontend ~/project # Use frontend team profile
Terminal window
# List active sessions
scc session list
# Resume a previous session
scc start --resume ~/project
# Stop a session
scc session stop <session-id>

SCC requires:

  • Docker Desktop 4.50+ (macOS, Windows) or Docker Engine (Linux)
  • Docker Engine running when you use SCC
  • Sufficient disk space for container images
Terminal window
# Check Docker is running
docker info
# Check Docker version
docker --version
# Verify SCC can access Docker
scc doctor
Error: Cannot connect to Docker daemon

Start Docker Desktop or Docker Engine, then retry.

Error: Permission denied while trying to connect to Docker daemon

On Linux, add your user to the docker group:

Terminal window
sudo usermod -aG docker $USER
# Log out and back in
Error: Failed to pull image

Check network connectivity and Docker Hub access. For air-gapped environments, pre-pull images or configure a local registry.

Preview what would happen without actually starting:

Terminal window
scc start --dry-run ~/project

Get machine-readable output for scripting:

Terminal window
scc start --dry-run --json ~/project

Network policies are configured at the org/team level:

{
"defaults": {
"network_policy": "isolated"
}
}