@jiangsier/cc-c
v1.5.0
Published
Claude Code Container — launch a containerized claude session from any project directory via docker compose
Downloads
21
Maintainers
Readme
Claude Code Container
cc-c — run claude (the Claude Code CLI) inside a container with a single command.
cc-c is a thin wrapper around claude: it treats the current directory as the project directory, automatically mounts the host's Claude config, project code, and SSH credentials, then launches claude inside the container. Every argument passed to cc-c is forwarded verbatim to claude in the container.
Installation
npm install -g @jiangsier/cc-cThis gives you a global cc-c command.
Prerequisites
Docker is installed on the host, and
docker composeworks.The host's
~/.claude/directory must have Claude configured (login credentials, settings, etc.). The container mounts the host's~/.claudeto/home/node/.claudeinside the container, soclaudereuses the host configuration directly. If the host's~/.claude/is not configured (e.g. not logged in),claudein the container won't work either. You can runclaudeonce on the host to complete login and initial setup.The container image is pulled from
jiangsier/ccc:lateston Docker Hub by default. To override, set theCCC_IMAGEenvironment variable, e.g.:CCC_IMAGE=jiangsier/ccc:latest cc-c
Built-in tools in the image
The container image (jiangsier/ccc) ships a complete dev toolchain, so claude can invoke these directly inside the container — no extra installs needed on the host or in the container. Preinstalled tools include, among others:
- C/C++:
gcc,make - Java:
temurin-25-jdk,maven - Python:
python3(3.14.6),pip,venv(pip index pointed atmirrors.aliyun.com) - Node:
node(26.5.0),npm, from thenode:bookwormbase image - Golang:
go(1.26.5) - Others:
git,zip/unzip,vim,ffmpeg,ssh/openssl/curl/wget,net-tools/iproute2,nfs-common,rsync,clawhub, etc.
Usage
From any project directory, simply run:
cc-cto launch an interactive claude inside the container. Arguments passed to cc-c are forwarded to claude, e.g.:
cc-c --dangerously-skip-permissions
# runs inside the container: claude --dangerously-skip-permissionsHow it works
cc-c does the following:
Takes the current directory (
$PWD) as the project directory and its basename as the project name.Exports
CCC_PROJECT_DIR=$PWDandCCC_PROJECT=$(basename $PWD).Uses the
compose.ymlbundled inside the package (nocompose.ymlis needed in the current directory) to run:docker compose -f <temp compose.yml> run --rm ccc <your cc-c args...>
The compose service's entrypoint is claude, so the arguments following cc-c are ultimately handed to claude inside the container.
At runtime the container:
- uses
hostnetwork mode; - mounts the host's
~/.claude(Claude config/settings) →/home/node/.claudeinside the container; - mounts the current project directory →
/home/node/<project>inside the container, and uses it as the working directory; - mounts the host's
~/.ssh(SSH credentials) →/home/node/.sshinside the container; - launches with
claudeas the entrypoint from/home/node/<project>.
Optional environment variables:
| Variable | Purpose | Default |
| --- | --- | --- |
| CCC_IMAGE | Override the container image | jiangsier/ccc:latest |
| CCC_CONFIG_DIR | Host Claude config directory | $HOME/.claude |
| CCC_PROJECT_DIR | Host project directory (auto-set by cc-c to the current directory) | $PWD |
| CCC_PROJECT | Container project mount basename and working-directory name (auto-set by cc-c) | $(basename $PWD) |
License
MIT
