← 返回 Skills 市场
ericlooi504

Docker Helper

作者 ericlooi504 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
35
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install eric-docker-helper
功能描述
Manage Docker containers, images, volumes, networks, and Docker Compose projects. Use when the user wants to: (1) List/start/stop/restart Docker containers,...
使用说明 (SKILL.md)

Docker Helper

Simplify Docker container management, compose setup, and debugging through natural language commands.

When to Use

USE this skill when:

  • "Show me all running containers"
  • "Start/stop/restart container [name]"
  • "Show logs for [container]"
  • "Check disk usage of Docker"
  • "Prune unused containers/images"
  • "Create a docker-compose.yml for [service]"
  • "What's running on port 8080?"
  • "Container [name] won't start, debug it"

DON'T use this skill when:

  • Need Kubernetes management → use a K8s skill
  • Building complex multi-service orchestrations → consider Docker Swarm/K8s skills
  • Production deployment with zero-downtime → use deployment-specific skills

Workflow

1. Container Management

When the user asks about containers, the agent runs:

# List all
docker ps -a
docker ps --format "table {{.Names}}	{{.Status}}	{{.Ports}}"

# Inspect specific
docker inspect [container] | jq '.[0].NetworkSettings.Ports'
docker stats [container] --no-stream

# Control
docker start/stop/restart [container]
docker rm -f [container]    (only with user confirmation)

2. Logs & Debugging

For debugging container issues:

# Standard logs
docker logs [container] --tail 50
docker logs [container] --tail 200 | grep -i error

# Resource issues
docker stats --no-stream

# Check why container exited
docker inspect [container] | jq '.[0].State'
docker logs [container] --tail 20 --timestamps

3. Image Management

# List images
docker images

# Build
docker build -t [name]:[tag] .

# Cleanup (with confirmation)
docker image prune -a -f

4. Docker Compose

When the user needs a compose file:

  1. Ask what services they need (e.g., "nginx + postgres + redis")
  2. Generate a docker-compose.yml with:
    • Appropriate image tags (avoid latest in production)
    • Volume mounts for persistence
    • Network configuration
    • Health checks where applicable
    • Environment variable stubs (.env file)
  3. Show the user the generated file, offer to adjust

5. Resource Cleanup (WITH CONFIRMATION)

Always ask for confirmation before:

  • docker system prune -a -f (removes ALL unused resources)
  • docker volume prune -f (removes orphaned volumes with data)
  • docker image rm without the -f flag first

Common Templates

Web App (Node/Python + Postgres):

services:
  app:
    build: .
    ports: ["${PORT}:${PORT}"]
    env_file: .env
    depends_on: [db]
  db:
    image: postgres:16-alpine
    volumes: ["pgdata:/var/lib/postgresql/data"]
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_PASSWORD: ${DB_PASS}
volumes: {pgdata:}

Nginx Reverse Proxy:

services:
  nginx:
    image: nginx:alpine
    ports: ["80:80", "443:443"]
    volumes: ["./nginx.conf:/etc/nginx/nginx.conf:ro", "./html:/usr/share/nginx/html:ro"]

Examples

User: "What containers are running?" Agent: Runs docker ps --format "table..." and shows a clean table

User: "My nginx container won't start" Agent: Checks logs + inspect, identifies the port conflict or config error

User: "Clean up Docker, it's using too much space" Agent: Runs docker system df, shows usage, asks what to prune

User: "Create a compose file for a Python app with Redis" Agent: Generates docker-compose.yml + .env.example, explains each part

Notes

  • Always prefix destructive commands with confirmation
  • Use docker compose (v2) over docker-compose (v1) when available
  • Prefer alpine-based images for smaller footprint
  • For security: never expose Docker socket without TLS
安全使用建议
Install this only if you want the agent to help operate your local Docker environment. Review command targets carefully, require confirmation before remove/prune operations, back up important volumes, and ensure jq is installed or ask the agent to avoid jq-based commands.
功能分析
Type: OpenClaw Skill Name: eric-docker-helper Version: 1.0.0 The skill bundle is a standard utility for managing Docker environments, providing instructions for container lifecycle management, log inspection, and Docker Compose generation. It includes safety-conscious instructions, such as requiring user confirmation before executing destructive commands like 'docker system prune' or 'docker rm'. No evidence of data exfiltration, malicious execution, or prompt injection was found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
The stated purpose and instructions coherently focus on Docker container, image, volume, network, and Compose management; those capabilities are powerful but disclosed.
Instruction Scope
The skill tells the agent to run Docker CLI commands for Docker-related user requests and explicitly requires confirmation before the most destructive prune/remove commands.
Install Mechanism
There is no install code and Docker/docker-compose are declared, but the instructions also use jq without declaring it as a required binary.
Credentials
Local Docker access is proportionate for this skill, but stop/restart/remove/prune/build operations can affect services, disk use, and Docker data.
Persistence & Privilege
No hidden persistence or credential handling is shown; generated Compose files and Docker volumes can create or delete persistent application data, with deletion steps confirmation-gated.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install eric-docker-helper
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /eric-docker-helper 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Docker container management, compose templates, debugging & cleanup
元数据
Slug eric-docker-helper
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Docker Helper 是什么?

Manage Docker containers, images, volumes, networks, and Docker Compose projects. Use when the user wants to: (1) List/start/stop/restart Docker containers,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 Docker Helper?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install eric-docker-helper」即可一键安装,无需额外配置。

Docker Helper 是免费的吗?

是的,Docker Helper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Docker Helper 支持哪些平台?

Docker Helper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Docker Helper?

由 ericlooi504(@ericlooi504)开发并维护,当前版本 v1.0.0。

💬 留言讨论