← 返回 Skills 市场
elric2011

docker-remote

作者 elric2011 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
381
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install docker-remote
功能描述
Remotely manage Docker Compose instances via SSH. Execute docker compose commands, view logs, update images, and exec into containers on remote servers. Use...
使用说明 (SKILL.md)

Docker Remote Skill

Remotely manage Docker Compose instances through SSH connections.

Overview

This skill provides a complete set of actions for Docker Compose lifecycle management on remote servers. All operations are performed via SSH, requiring only standard SSH and Docker tools on both client and server.

Quick Start

# Start services
docker_compose_up host=192.168.1.100 user=root path=/opt/myapp

# Check status
docker_compose_ps host=192.168.1.100 user=root path=/opt/myapp

# View logs
docker_compose_logs host=192.168.1.100 user=root path=/opt/myapp tail=50

# Update and restart
docker_compose_update host=192.168.1.100 user=root path=/opt/myapp pull=always

Actions

docker_compose_up

Start Docker Compose services in detached mode.

Parameters:

  • host (required): Remote SSH host (IP or hostname)
  • user (required): SSH username
  • path (required): Directory containing docker-compose.yml
  • port (optional, default: 22): SSH port
  • key_path (optional): SSH private key path
  • timeout (optional, default: 60): Operation timeout in seconds

Example:

docker_compose_up host=192.168.1.100 user=admin path=/opt/app port=2222

docker_compose_down

Stop and remove containers, networks, and volumes defined in docker-compose.yml.

Parameters: Same as up

Example:

docker_compose_down host=192.168.1.100 user=admin path=/opt/app

docker_compose_start

Start specific stopped services.

Parameters:

  • All up parameters
  • service (optional): Service name to start (starts all if not specified)

Example:

docker_compose_start host=192.168.1.100 user=admin path=/opt/app service=web

docker_compose_stop

Stop running services without removing them.

Parameters:

  • All up parameters
  • service (optional): Service name to stop (stops all if not specified)

Example:

docker_compose_stop host=192.168.1.100 user=admin path=/opt/app service=worker

docker_compose_restart

Restart services.

Parameters:

  • All up parameters
  • service (optional): Service name to restart

Example:

docker_compose_restart host=192.168.1.100 user=admin path=/opt/app service=api

docker_compose_ps

List all containers with their status.

Parameters: Same as up

Example:

docker_compose_ps host=192.168.1.100 user=admin path=/opt/app

docker_compose_logs

Fetch and display logs from services.

Parameters:

  • All up parameters
  • service (optional): Filter logs to specific service
  • tail (optional, default: 100): Number of lines to show
  • follow (optional, default: false): Stream logs continuously

Example:

docker_compose_logs host=192.168.1.100 user=admin path=/opt/app tail=50 follow=true

docker_compose_update

Pull the latest images and restart services.

Parameters:

  • All up parameters
  • force_recreate (optional, default: false): Force recreate containers
  • pull (optional): Image pull policy (never, always, missing)
  • command (optional): Custom command to execute instead of default "pull && up"

Example:

# Default behavior
docker_compose_update host=192.168.1.100 user=admin path=/opt/app pull=always

# Custom command
docker_compose_update host=192.168.1.100 user=admin path=/opt/app command="sh ./upgrade.sh"

docker_compose_exec

Execute a command in a running container.

Parameters:

  • All up parameters
  • service (required): Container name to execute in
  • command (required): Command to execute
  • timeout (optional, default: 60): Command execution timeout

Example:

docker_compose_exec host=192.168.1.100 user=admin path=/opt/app service=web command="ls -la /app"

Implementation Notes

  • SSH connections use key-based authentication by default
  • Always change to the correct directory before running docker compose commands
  • Use -d flag for detached mode when starting services
  • Handle SSH connection timeouts and authentication failures gracefully
  • Return structured output with success/failure status and relevant logs
  • Include error context when operations fail

Error Handling

Common errors and handling:

  1. SSH connection refused: Verify host, port, and network access
  2. Authentication failed: Check SSH key path and permissions
  3. Path not found: Ensure docker-compose.yml exists at specified path
  4. Docker not running: Verify Docker daemon is accessible on remote host
  5. Permission denied: Check user has access to Docker socket

Deployment Configuration

This skill supports a deploy-apps.json configuration file that maps your remote hosts and applications. The Agent automatically reads this configuration to resolve host aliases, app names, SSH credentials, and file paths.

Configuration File

The structure of the deploy-apps.json file should be as follows:

{
    "hosts": {
        "\x3Chost-alias>": {
            "host": "remote.server.com",
            "description": "Server description",
            "base-dir": "/path/to/docker",
            "user": "ssh-user",
            "apps": {
                "\x3Capp-name>": {
                    "description": "Application description",
                    "update-command": "Custom command to execute update"
                }
            }
        }
    }
}

How It Works

When you reference a host alias or app name, the Agent:

  1. Reads deploy-apps.json to find the matching configuration
  2. Resolves host to the actual SSH hostname/IP
  3. Constructs path from \x3Cbase-dir>/\x3Capp-name>
  4. Uses the configured user for SSH authentication

Configuration Parameters

Parameter Type Required Description
hosts.\x3Calias>.host string Yes Remote SSH hostname or IP
hosts.\x3Calias>.base-dir string Yes Base directory containing app folders
hosts.\x3Calias>.user string Yes SSH username
hosts.\x3Calias>.description string No Human-readable description
hosts.\x3Calias>.apps.\x3Cname>.description string Yes* App description
hosts.\x3Calias>.apps.\x3Cname>.update-command string Yes* Custom command to execute update

Path Resolution Example

With:

  • base-dir: /data/docker
  • app-name: mysql

The resolved path would be: /data/docker/mysql

See Also

安全使用建议
This skill appears to do what it claims (manage Docker Compose over SSH). Before installing or using it: 1) Do not store private SSH keys or other secrets in shared config files (deploy-apps.json) or include absolute paths to private keys unless you intend the agent to access them. 2) Prefer using dedicated deployment keys with limited scope, SSH agent forwarding, or ephemeral keys rather than your personal ~/.ssh keys. 3) Restrict the SSH user to minimal privileges (avoid root when possible) and audit Docker socket access on remote hosts. 4) Test the skill in a non-production environment first to confirm it only reads the intended config and does not access unexpected local files. If you need the agent to use an SSH key, pass it via a secure mechanism under your control rather than embedding it in skill configs.
功能分析
Type: OpenClaw Skill Name: docker-remote Version: 1.0.0 The 'docker-remote' skill enables an AI agent to manage remote Docker Compose instances via SSH, defining actions in SKILL.md such as 'docker_compose_exec' and 'docker_compose_update' that allow for arbitrary command execution on remote hosts. While these capabilities are aligned with the stated purpose of DevOps automation and the documentation includes security best practices (references/README.md), providing an agent with broad RCE-capable tools is inherently high-risk. No evidence of intentional malice, such as data exfiltration or unauthorized persistence, was found in the provided files.
能力评估
Purpose & Capability
Name, description, and provided actions (up, down, logs, exec, update, etc.) align with the included SKILL.md and example configs. No unrelated binaries, environment variables, or external services are requested.
Instruction Scope
Instructions stay within remote Docker/SSH management. The SKILL.md explicitly states the Agent will "automatically read" deploy-apps.json to resolve host aliases and SSH credentials; parameters and examples also reference key_path and absolute private-key locations (e.g., /Users/admin/.ssh/deploy_key). That implies the Agent may be directed to access local key files or use agent forwarding — expected for SSH-based management, but sensitive. The guidance about never exposing .env files and avoiding printing secrets is good, but callers must avoid giving the agent access to private keys or secrets unless intended.
Install Mechanism
Instruction-only skill with no install steps and no code files to execute — lowest installation risk.
Credentials
No required environment variables or credentials are declared, which is proportionate. However parameters and examples permit specifying key_path and the deploy configuration can contain SSH-related entries; those are effectively credentials (private keys or pointers to them). The skill does not require unrelated secrets, but users should be careful not to place private keys or sensitive secrets in the config files or expose them to the Agent.
Persistence & Privilege
always is false, no install writing to disk, and the skill does not request changes to other skills or system-wide settings. The skill can be invoked by the model (default), which is normal for skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install docker-remote
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /docker-remote 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Docker Remote skill. - Remotely manage Docker Compose instances via SSH on any server. - Supports starting, stopping, restarting, and updating services, viewing logs, and executing commands inside containers. - Actions accept SSH parameters and can use custom deployment configuration for easier host/app mapping. - Handles common errors such as SSH/auth failures, missing compose files, or Docker not running. - Includes structured output and guides for `deploy-apps.json` usage and configuration.
元数据
Slug docker-remote
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

docker-remote 是什么?

Remotely manage Docker Compose instances via SSH. Execute docker compose commands, view logs, update images, and exec into containers on remote servers. Use... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 381 次。

如何安装 docker-remote?

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

docker-remote 是免费的吗?

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

docker-remote 支持哪些平台?

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

谁开发了 docker-remote?

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

💬 留言讨论