← Back to Skills Marketplace
tonakic

Docker Claude Code Setup

by tonakic · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
125
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install docker-claude-code-setup
Description
Guide for setting up Claude Code in Docker containers with ttyd web terminal, tmux session persistence, acpx multi-agent tool, and API configuration. Use whe...
README (SKILL.md)

Docker Claude Code Setup / Docker 环境部署 Claude Code

Complete guide for deploying Claude Code in Docker containers with web terminal access and persistent sessions.

在 Docker 容器中完整部署 Claude Code 的指南,支持 Web 终端访问和会话持久化。

Quick Start / 快速开始

1. Install Claude Code / 安装 Claude Code

# Install Node.js if needed / 如需要先安装 Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

# Install Claude Code / 安装 Claude Code
npm install -g @anthropic-ai/claude-code

See references/claude-code-installation.md for detailed configuration.

详细配置见 references/claude-code-installation.md

2. Install ttyd + tmux / 安装 ttyd + tmux

# Install packages / 安装软件包
apt-get update && apt-get install -y ttyd tmux

# Run setup script / 运行启动脚本
bash scripts/start-ttyd.sh 6080

Access at http://localhost:6080 - sessions persist after browser close!

访问 http://localhost:6080 - 关闭浏览器后会话保持!

See references/ttyd-tmux-setup.md for configuration details.

配置详情见 references/ttyd-tmux-setup.md

3. Install acpx (Optional) / 安装 acpx (可选)

# Install acpx / 安装 acpx
bash scripts/install-acpx.sh

# Usage / 使用
acpx claude-code "your task"

See references/acpx-setup.md for multi-agent configuration.

多代理配置见 references/acpx-setup.md

4. Configure API / 配置 API

# Set environment variables / 设置环境变量
export ANTHROPIC_API_KEY="your-api-key"
export ANTHROPIC_BASE_URL="https://api.example.com/v1"  # Optional / 可选
export ANTHROPIC_MODEL="model-name"  # Optional / 可选

# Start Claude Code / 启动 Claude Code
claude

See references/api-configuration.md for provider-specific settings.

各提供商配置见 references/api-configuration.md

Docker Persistence / Docker 持久化

In Docker containers, map config directories to persistent storage:

在 Docker 容器中,将配置目录映射到持久化存储:

# Create persistent directories / 创建持久化目录
mkdir -p ~/workspace/claude-code/.claude
mkdir -p ~/workspace/.acpx
mkdir -p ~/workspace/.gradle  # For Android projects

# Create symlinks / 创建符号链接
ln -sf ~/workspace/claude-code/.claude ~/.claude
ln -sf ~/workspace/.acpx ~/.acpx
ln -sf ~/workspace/.gradle ~/.gradle

Architecture Overview / 架构概览

┌─────────────────────────────────────────────────┐
│                   Web Browser                    │
│              http://HOST:6080                   │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                    ttyd                          │
│            (Web Terminal Server)                │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                   tmux                           │
│      (Session Persistence Layer)                │
│    - Survives browser close                     │
│    - Multiple windows/panes                     │
│    - Mouse scroll support                       │
└─────────────────────┬───────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────┐
│                Claude Code                       │
│          (AI Coding Assistant)                  │
│    - Multiple API providers                     │
│    - Project-level instructions (CLAUDE.md)     │
└─────────────────────────────────────────────────┘

Scripts / 脚本

Script Description
scripts/start-ttyd.sh Start ttyd + tmux web terminal
scripts/install-acpx.sh Install acpx multi-agent tool
脚本 说明
scripts/start-ttyd.sh 启动 ttyd + tmux Web 终端
scripts/install-acpx.sh 安装 acpx 多代理工具

Reference Documents / 参考文档

Document Content
claude-code-installation.md Claude Code installation and configuration
ttyd-tmux-setup.md Web terminal and session persistence
acpx-setup.md Multi-agent tool configuration
api-configuration.md API provider settings
文档 内容
claude-code-installation.md Claude Code 安装与配置
ttyd-tmux-setup.md Web 终端与会话持久化
acpx-setup.md 多代理工具配置
api-configuration.md API 提供商设置

tmux Quick Reference / tmux 快捷键

Shortcut Action
Ctrl+B D Detach (keep session running)
Ctrl+B C New window
Ctrl+B N/P Next/Previous window
Mouse scroll View history
快捷键 功能
Ctrl+B D 断开 (会话保持运行)
Ctrl+B C 新建窗口
Ctrl+B N/P 下一个/上一个窗口
鼠标滚轮 查看历史
Usage Guidance
This skill appears to do what it says, but take precautions before running its scripts: - Treat the ttyd web terminal as a high-risk action: do not expose it to the public Internet without authentication and TLS. Prefer running it only on localhost or behind an authenticated reverse proxy (nginx with HTTPS and auth). - Review and understand any curl | bash and npm install -g steps before executing; consider installing packages inside an isolated container or ephemeral VM first. - Do not enable overly permissive Claude Code permissions (e.g., Bash(**), Read/Edit/Write(**)) unless you understand the implications; prefer least privilege. - Store API keys in environment variables or .env files that are in .gitignore; rotate keys if they are exposed. - If you need to expose remote access, add authentication (ttyd supports basic auth/SSL when configured behind a proxy) and audit access logs. If you want a lower-risk deployment, run the install steps inside a dedicated Docker container with limited network exposure and no persistent secrets on the host.
Capability Analysis
Type: OpenClaw Skill Name: docker-claude-code-setup Version: 1.0.0 The skill bundle provides scripts and documentation to set up Claude Code with a web-accessible terminal via ttyd and tmux. It contains high-risk configurations, specifically starting an unauthenticated web terminal with write access on port 6080 (scripts/start-ttyd.sh) and recommending the manual granting of broad filesystem and shell permissions to the AI agent (references/api-configuration.md). While these features are aligned with the stated goal of creating a persistent development environment, they significantly increase the attack surface if the container's ports are exposed or if the agent is compromised.
Capability Assessment
Purpose & Capability
Name and description match the provided artifacts: SKILL.md explains installing Claude Code, ttyd+tmux for a web terminal, and acpx. The two scripts and four reference docs all relate directly to these tasks; no unrelated credentials, binaries, or install steps are requested.
Instruction Scope
Instructions explicitly start a web-accessible shell via ttyd (-W enables write) and tmux and show how to expose it (http://HOST:6080). They also recommend mapping persistent config directories and provide commands that run as root (apt-get, curl|bash). While expected for the stated purpose, launching an unauthenticated web terminal and running curl|bash without guidance to secure the endpoint is a material security risk.
Install Mechanism
There is no platform install spec, but the included scripts execute network installs (nodesource curl setup, apt-get, npm install -g). These come from well-known sources (NodeSource, apt, npm) which is standard for this use case, but network installs and global npm packages carry the usual supply-chain risk and should be reviewed before running.
Credentials
The skill does not require any credentials by default. The docs ask users to set ANTHROPIC_API_KEY / ANTHROPIC_BASE_URL etc., which is proportionate to running Claude Code. However the docs also recommend permissive settings (e.g., permissions allowing Bash(**), Read/Edit/Write(**)) which are broad and elevate risk if enabled unnecessarily.
Persistence & Privilege
The skill is not forced-always, and it does not attempt to modify other skills or system-wide agent settings. It writes files/config under the user's home (~/.tmux.conf, ~/.acpx, ~/.claude) which is expected for setup scripts.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install docker-claude-code-setup
  3. After installation, invoke the skill by name or use /docker-claude-code-setup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Complete guide for setting up Claude Code in Docker with persistent, web-accessible terminal and multi-agent workflows. - Provides step-by-step setup for Claude Code in Docker containers, including quick start instructions. - Integrates ttyd (web terminal) and tmux (session persistence) for browser-based shell access. - Offers optional acpx installation for multi-agent development workflows. - Details environment variable setup for configuring API keys and providers. - Includes instructions for Docker directory persistence and clear architecture overview. - Documentation is fully bilingual (English and Chinese).
Metadata
Slug docker-claude-code-setup
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Docker Claude Code Setup?

Guide for setting up Claude Code in Docker containers with ttyd web terminal, tmux session persistence, acpx multi-agent tool, and API configuration. Use whe... It is an AI Agent Skill for Claude Code / OpenClaw, with 125 downloads so far.

How do I install Docker Claude Code Setup?

Run "/install docker-claude-code-setup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Docker Claude Code Setup free?

Yes, Docker Claude Code Setup is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Docker Claude Code Setup support?

Docker Claude Code Setup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Docker Claude Code Setup?

It is built and maintained by tonakic (@tonakic); the current version is v1.0.0.

💬 Comments