Skip to content
dsh-market Browse plugins GitHub 中文

STARDUSTLC666/dsh-docker

Docker tools for agents: ps/images/logs/inspect/exec/manage with JSON output, env-configurable CLI path, approval-gated exec and zero runtime dependencies.

Stars ★ 3 Category Tools & Capabilities Listed 2026-08-17 npm @stardustlc/dsh-docker

Install

Inside DeepSeek Harness, with dsh-market

dsh plugin --profile web add dshmarket

Or from the command line

dsh plugin --profile web add @stardustlc/dsh-docker

Installing runs third-party code with your own permissions — it can read your files, use your credentials and reach the network. Review the source first, and pin a commit (github:owner/repo#sha) when you can.

README

中文

dsh-docker

Your agent can manage containers now: five tools covering container listing, logs, inspection, in-container exec, and lifecycle management.

DSH (DeepSeek Harness) container-management plugin: runs the docker CLI through the official subprocess service with shell-free argv arrays, six tools including image listing, an approval gate on docker_exec, and zero runtime dependencies.

Installation

dsh plugin --profile web add @stardustlc/dsh-docker

Requires Docker installed locally (docker version should work); use dockerPath when it is not on PATH.

Configuration

- id: docker
  name: '@stardustlc/dsh-docker'
  config:
    # dockerPath: C:\Program Files\Docker\Docker\resources\bin\docker.exe
    dockerPath: docker     # optional; or use the DSH_DOCKER_PATH env var
    timeoutMs: 60000       # per-operation timeout (default 60s, 5s - 10min)
    # execApproval: false  # disable the docker_exec approval gate (default true)

Tools

Tool Purpose Safety
docker_ps List containers (status/image/state, filterable)
docker_images List local images (repository/tag/size/created, dangling-only filter)
docker_logs Tail container logs (line clamp, short follow)
docker_inspect Container details (image/state/ports)
docker_exec Run a command inside a container Approval gate + container-name validation
docker_manage start / stop / restart / rm Destructive actions clearly labeled

Examples

docker_ps {}
docker_ps { all: true, name: web }
docker_images { dangling: true }
docker_logs { container: web, tail: 200 }
docker_inspect { container: web }
docker_exec { container: web, command: 'df -h' }
docker_manage { container: web, action: restart }

Safety

  • No shell: every argument is its own argv element — command injection is impossible
  • Approval gate: docker_exec asks first (mirroring dsh-email / dsh-sql); headless environments without an approval channel are denied
  • Container-name validation: only [A-Za-z0-9][A-Za-z0-9_.:-]* accepted — no argument injection
  • Timeout clamps: 5s - 10min per operation; follow mode capped at an extra 30s
  • Log clamping: tail 1-2000 lines

Development

pnpm install
pnpm test       # build + 24 tests

License

MIT

Content from the project README on GitHub ↗