返回顶部
d

docker-sandboxDocker沙箱

Create and manage Docker sandboxed VM environments for safe agent execution. Use when running untrusted code, exploring packages, or isolating agent workloads. Supports Claude, Codex, Copilot, Gemini, and Kiro agents with network proxy controls.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,159
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

docker-sandbox

Docker Sandbox

Run agents and commands in isolated VM environments using Docker Desktop's sandbox feature. Each sandbox gets its own lightweight VM with filesystem isolation, network proxy controls, and workspace mounting via virtiofs.

When to Use

  • - Exploring untrusted packages or skills before installing them system-wide
  • Running arbitrary code from external sources safely
  • Testing destructive operations without risking the host
  • Isolating agent workloads that need network access controls
  • Setting up reproducible environments for experiments

Requirements

  • - Docker Desktop 4.49+ with the docker sandbox plugin
  • Verify: INLINECODE1

Quick Start

Create a sandbox for the current project

CODEBLOCK0

This creates a VM-isolated sandbox with:

  • - The current directory mounted via virtiofs
  • Node.js, git, and standard dev tools pre-installed
  • Network proxy with allowlist controls

Run commands inside

CODEBLOCK1

Run an agent directly

CODEBLOCK2

Commands Reference

Lifecycle

CODEBLOCK3

Network Controls

The sandbox includes a network proxy for controlling outbound access.

CODEBLOCK4

Custom Templates

CODEBLOCK5

Workspace Mounting

The workspace path on the host is mounted into the sandbox via virtiofs. The mount path inside the sandbox preserves the host path structure:

Host OSHost PathSandbox Path
WindowsINLINECODE2INLINECODE3
macOS
/Users/me/projects/my-app | /Users/me/projects/my-app |
| Linux | /home/me/projects/my-app | /home/me/projects/my-app |

The agent's home directory is /home/agent/ with a symlinked workspace/ directory.

Environment Inside the Sandbox

Each sandbox VM includes:

  • - Node.js (v20.x LTS)
  • Git (latest)
  • Python (system)
  • curl, wget, standard Linux utilities
  • npm (global install directory at /usr/local/share/npm-global/)
  • Docker socket (at /run/docker.sock - Docker-in-Docker capable)

Proxy Configuration (auto-set)

CODEBLOCK6

Important: Node.js fetch (undici) does NOT respect HTTP_PROXY env vars by default. For npm packages that use fetch, create a require hook:

CODEBLOCK7

Run with: INLINECODE15

Patterns

Safe Package Exploration

CODEBLOCK8

Persistent Dev Environment

CODEBLOCK9

Locked-Down Agent Execution

CODEBLOCK10

Troubleshooting

"client version X is too old"

Update Docker Desktop to 4.49+. The sandbox plugin requires engine API v1.44+.

"fetch failed" inside sandbox

Node.js fetch doesn't use the proxy. Use the proxy-fix.js require hook above, or use curl instead: CODEBLOCK11

Path conversion on Windows (Git Bash / MSYS2)

Git Bash converts /path to C:/Program Files/Git/path. Prefix commands with: CODEBLOCK12

Sandbox won't start after Docker update

CODEBLOCK13

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 docker-sandbox-lucas-1776420000 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 docker-sandbox-lucas-1776420000 技能

通过命令行安装

skillhub install docker-sandbox-lucas-1776420000

下载

⬇ 下载 docker-sandbox v1.0.1(免费)

文件大小: 3.57 KB | 发布时间: 2026-4-17 20:20

v1.0.1 最新 2026-4-17 20:20
- Updated meta file formatting; no user-facing changes.
- Clarified or standardized metadata structure for consistency.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部