Word / DOCX
一个面向 Content 场景的 Agent 技能。原始说明:Create, inspect, and edit Microsoft Word documents and DOCX files with reliable styles, numbering, tracked changes, tables, sections, and compatibility check...
name: docker
displayName: Docker
description: Installs and uses Docker reliably with official docs. Use when installing Docker (Desktop or Engine), building or running containers, writing Dockerfiles, using docker compose, or when the user asks about containers, images, or Docker CLI.
homepage: https://docs.docker.com/
metadata: {"openclaw": {"requires": {"anyBins": ["docker"]}, "install": {"brew": "docker"}, "primaryEnv": null}}
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 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).
| 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.
Install Docker on the host so the docker CLI and daemon are available. After install, ensure the daemon is running (docker run hello-world).
Recommended: Docker Desktop
https://desktop.docker.com/mac/main/arm64/Docker.dmghttps://desktop.docker.com/mac/main/amd64/Docker.dmgDocker.dmg, drag Docker to Applications, then open Docker.app and accept terms. sudo hdiutil attach Docker.dmg
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install
sudo hdiutil detach /Volumes/Docker
docker run hello-worldOpenClaw / 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.
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc 2>/dev/null | cut -f1)
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
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.
Use Get Docker and follow Docker Desktop for Windows (WSL2 backend recommended).
COPY . "/app/Docker Skill").docker build -t <name> .docker run -d -p HOST_PORT:CONTAINER_PORT <name> (e.g. -p 127.0.0.1:3000:3000).docker ps (running), docker ps -a (all).docker stop <container>, docker rm <container>.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
docker run --rm alpine echo "Hello from Alpine"
docker run --name my-test alpine echo "test"
docker stop my-test
docker rm my-test
docker run --name hello hello-world
docker rm hello
docker rmi hello-world
docker build -t myapp .
docker run -d -p 127.0.0.1:3000:3000 myapp
docker ps
docker stop <container_id>
docker rm <container_id>
docker compose up -d
docker compose logs -f
docker compose down
docker CLI talks to its daemon.DOCKER_HOST (e.g. unix://$HOME/.colima/default/docker.sock) so the CLI and scripts find the daemon.sudo systemctl start docker (and enable if needed).docker pull <image>, docker images, docker rmi <image>docker run, docker ps, docker stop, docker rm, docker logs <container>docker compose up -d, docker compose down — use compose.yaml in project root (see Compose file reference).docker system prune -a (removes unused images/containers/networks; use with care).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.