← 返回 Skills 市场
austindixson

Docker

作者 austindixson · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
590
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dacker
功能描述
Installs and uses Docker reliably with official docs. Use when installing Docker (Desktop or Engine), building or running containers, writing Dockerfiles, us...
使用说明 (SKILL.md)

Docker — Install and Use Containers

Enables OpenClaw (and Cursor) to install Docker and use it reliably. Base all guidance on official Docker docs; when in doubt, fetch from canonical URLs below.

When to Apply

  • User wants to install Docker (macOS, Linux, Windows)
  • User asks about containers, images, Dockerfile, docker compose
  • Building, running, or debugging Docker commands or workflows
  • User asks for "latest Docker docs" or "how do I use Docker"

When running inside Docker Test: The test container already has the Docker CLI and the host socket mounted. Use docker directly to create, run, stop, and remove containers; do not try to install Docker or use sudo. See LEARNINGS.md (Integration with Docker Test).

Canonical Documentation URLs

Purpose URL
Get started / overview https://docs.docker.com/get-started/overview/
Get Docker (install) https://docs.docker.com/get-started/get-docker/
Develop with containers https://docs.docker.com/get-started/introduction/develop-with-containers/
Guides https://docs.docker.com/guides/
Manuals (install, config, use) https://docs.docker.com/manuals/
Reference (CLI, Dockerfile, API) https://docs.docker.com/reference/
Engine install (Linux) https://docs.docker.com/engine/install/
Docker Desktop Mac https://docs.docker.com/desktop/install/mac-install/
Docker CLI reference https://docs.docker.com/reference/cli/docker/
Dockerfile reference https://docs.docker.com/reference/dockerfile/

Rule: For install steps, CLI syntax, or Dockerfile instructions, fetch the relevant doc URL and use that content. Do not rely on training data for version-specific install or command details.


Installation

Install Docker on the host so the docker CLI and daemon are available. After install, ensure the daemon is running (docker run hello-world).

Installation (reliable paths)

macOS

Recommended: Docker Desktop

  1. Download from official docs: Install Docker Desktop on Mac.
    • Apple Silicon: https://desktop.docker.com/mac/main/arm64/Docker.dmg
    • Intel: https://desktop.docker.com/mac/main/amd64/Docker.dmg
  2. Open Docker.dmg, drag Docker to Applications, then open Docker.app and accept terms.
  3. CLI install (optional): After downloading the DMG:
    sudo hdiutil attach Docker.dmg
    sudo /Volumes/Docker/Docker.app/Contents/MacOS/install
    sudo hdiutil detach /Volumes/Docker
    
  4. Verify: docker run hello-world

OpenClaw / automation: If docker is missing and the user is on macOS, suggest installing via Homebrew: brew install --cask docker, then starting Docker Desktop so the daemon is running.

Linux (Ubuntu example)

  1. Prefer Docker Engine from apt (see Install Docker Engine on Ubuntu).
  2. Remove conflicting packages first:
    sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc 2>/dev/null | cut -f1)
    
  3. Add Docker’s apt repo, then:
    sudo apt update
    sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    sudo systemctl start docker
    sudo docker run hello-world
    
  4. Optional (run without sudo): Linux postinstall — add user to docker group.

Convenience script (dev/test only): curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh. Not recommended for production.

Windows

Use Get Docker and follow Docker Desktop for Windows (WSL2 backend recommended).


Core Workflow: Build and Run

  1. Dockerfile in app directory (see reference.md or Dockerfile reference). If any path in COPY has spaces, quote it (e.g. COPY . "/app/Docker Skill").
  2. Build image: docker build -t \x3Cname> .
  3. Run container: docker run -d -p HOST_PORT:CONTAINER_PORT \x3Cname> (e.g. -p 127.0.0.1:3000:3000).
  4. List containers: docker ps (running), docker ps -a (all).
  5. Stop/remove: docker stop \x3Ccontainer>, docker rm \x3Ccontainer>.

Example from official getting-started:

docker build -t getting-started .
docker run -d -p 127.0.0.1:3000:3000 getting-started
# Open http://localhost:3000

Usage examples

  • Run a one-off command and remove the container:

    docker run --rm alpine echo "Hello from Alpine"
    
  • Create, run, then stop and remove a named container:

    docker run --name my-test alpine echo "test"
    docker stop my-test
    docker rm my-test
    
  • Pull an image, run a minimal container, then remove container and image:

    docker run --name hello hello-world
    docker rm hello
    docker rmi hello-world
    
  • Build and run a web app (port mapping):

    docker build -t myapp .
    docker run -d -p 127.0.0.1:3000:3000 myapp
    docker ps
    docker stop \x3Ccontainer_id>
    docker rm \x3Ccontainer_id>
    
  • Compose (multi-service):

    docker compose up -d
    docker compose logs -f
    docker compose down
    

Daemon Must Be Running

  • Docker Desktop (Mac/Windows): Ensure Docker Desktop app is running; docker CLI talks to its daemon.
  • Colima (macOS): If using Colima instead of Docker Desktop, set DOCKER_HOST (e.g. unix://$HOME/.colima/default/docker.sock) so the CLI and scripts find the daemon.
  • Linux: sudo systemctl start docker (and enable if needed).
  • If the user sees "Cannot connect to the Docker daemon", direct them to start Docker Desktop or the engine service and try again.

Quick Reference

  • Images: docker pull \x3Cimage>, docker images, docker rmi \x3Cimage>
  • Containers: docker run, docker ps, docker stop, docker rm, docker logs \x3Ccontainer>
  • Compose: docker compose up -d, docker compose down — use compose.yaml in project root (see Compose file reference).
  • Cleanup: docker system prune -a (removes unused images/containers/networks; use with care).

Volume mounts

When using -v HOST:CONTAINER, use stable host paths (e.g. a directory under the project or skill root). Avoid temporary directories (e.g. from mktemp); they may not mount reliably in some environments (sandboxes, CI, remote Docker). See LEARNINGS.md.

Additional Resources

安全使用建议
This skill appears to do what it says: give Docker install and usage guidance based on official docs. Before installing or following commands, remember: installing Docker requires admin privileges; the Docker daemon (and adding your user to the docker group) effectively grants broad access to the host filesystem and processes — treat that as an elevation of privilege. The skill suggests the official convenience script (get.docker.com) for quick installs; that’s convenient for development but not ideal for production. Also be cautious when running or copying advice that runs containers or mounts host paths (these can expose host files). If you plan to let an agent act autonomously with this skill, consider restricting it from running untrusted images or mounting sensitive host directories.
功能分析
Type: OpenClaw Skill Name: dacker Version: 1.0.1 The skill is designed to install and manage Docker, which inherently involves high-privilege operations. The primary reason for classifying it as 'suspicious' is the explicit instruction in `SKILL.md` for the AI agent to use the `curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh` command for 'dev/test only'. This `curl | bash` pattern is a known Remote Code Execution (RCE) vulnerability, as it executes arbitrary code downloaded from a remote server (`get.docker.com`) without prior inspection. While the domain is official and the instruction includes a warning ('Not recommended for production'), its presence as an executable instruction for the agent represents a significant security risk. There is no clear evidence of intentional malicious behavior like data exfiltration or unauthorized persistence beyond Docker's legitimate operations.
能力评估
Purpose & Capability
The name/description, required binary (docker), and the instructions all align: this skill exists to install, run, and author Docker artifacts. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
The SKILL.md stays on-topic (install, build, run, Dockerfile, compose) and explicitly directs the agent to consult official Docker docs. It also documents integration with a Docker Test environment where the host socket is mounted; this is expected for Docker tooling but is powerful — the guidance does mention the mounted host socket and advises using docker directly in that environment. No instructions ask the agent to read unrelated files or exfiltrate data. Minor inconsistency: the top-level registry states 'no install spec' while SKILL.md metadata contains an install hint (brew: docker); this appears cosmetic and does not change runtime behavior.
Install Mechanism
There is no packaged install script included in the skill (instruction-only). SKILL.md points to official Docker download URLs and Homebrew, which are appropriate. It also documents the official convenience script (https://get.docker.com) for dev/test use; the convenience script is functional but higher-risk for production installs, and SKILL.md correctly labels it 'not recommended for production'.
Credentials
The skill requests no environment variables or credentials. It references standard Docker-related env vars (e.g., DOCKER_HOST) only as operational guidance. There are no unexplained SECRET/TOKEN requirements.
Persistence & Privilege
The skill is instruction-only, always:false, and does not request persistent system privileges, nor does it modify other skills or agent-wide configuration. Autonomous model invocation is allowed (default) but not combined with other red flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dacker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dacker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added LEARNINGS.md documenting guidance for Docker integration and test environments. - Clarified behavior when running inside Docker Test: use `docker` directly, avoid install/sudo. - Added advice on quoting COPY paths with spaces in Dockerfiles. - Expanded usage examples for running, stopping, removing containers, and compose workflows. - Added Colima-specific note for macOS under daemon section. - Added best practices for volume mount paths and referenced LEARNINGS.md for more detail.
元数据
Slug dacker
版本 1.0.1
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Docker 是什么?

Installs and uses Docker reliably with official docs. Use when installing Docker (Desktop or Engine), building or running containers, writing Dockerfiles, us... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 590 次。

如何安装 Docker?

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

Docker 是免费的吗?

是的,Docker 完全免费(开源免费),可自由下载、安装和使用。

Docker 支持哪些平台?

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

谁开发了 Docker?

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

💬 留言讨论