tancheng33/dsh-code-runtime-container0

dsh-code-runtime-container

用于 DeepSeek Harness 代码执行缝隙的容器隔离后端插件,使代码在无网络的沙箱容器中运行。

AI 分析

核心用途是安全地执行 AI 生成的代码,防止恶意代码破坏宿主机。适合需要运行不受信任代码的用户。必要条件是宿主机需安装 Docker 或兼容的容器引擎,并提前拉取基础镜像。

套件
dsh-code-runtime-container
版本
0.1.0
授權
MIT
最近更新
2026年8月16日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:tancheng33/dsh-code-runtime-container

Configuration

Every default is the restrictive one; a backend whose point is isolation must not be safe only after configuration.

KeyDefaultMeaning
dockerPathdockerContainer CLI. Anything argv-compatible with docker run.
imagenode:22-alpineNeeds a node on PATH and nothing else.
networknoneDocker network mode. The main reason to use this backend.
memory512mMemory ceiling; an overrun is an OOM kill reported as worker-exit.
cpus1Kernel-enforced CPU quota.
pidsLimit128Process ceiling: a fork bomb hits it, not the host.
user65534:65534nobody:nogroup. Empty uses the image default.
readOnlyRootfstrueRead-only root, with a tmpfs at /tmp.
tmpfsMb64Size of that tmpfs.
workspacePath''Absolute host path to mount at /workspace. Empty mounts nothing.
workspaceReadOnlytrueMount the workspace read-only.
extraArgs[]Extra docker run flags. An escape hatch that can weaken every default above.
maxWallMs120000Wall-clock ceiling for one run, including container start.
maxOutputBytes4194304Combined cap on logs plus completion value.

Programs that must read project files need a mount:

- id: code-runtime-container
  config:
    workspacePath: /Users/me/projects/app
    workspaceReadOnly: true
    # …restate the rest; a patch replaces a row's whole config