← 返回 Skills 市场
Docker Ops
作者
ericlooi504
· GitHub ↗
· v1.0.2
· MIT-0
11
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install docker-ops-toolkit
功能描述
Docker container lifecycle management, health checks, log analysis, cleanup, compose orchestration, and troubleshooting. Use when Codex needs to manage Docke...
使用说明 (SKILL.md)
Docker Ops
Overview
Docker container lifecycle management, health checks, log analysis, cleanup, compose orchestration, and troubleshooting. Use when Codex needs to manage Docker containers, debug running services, or clean up Docker resources.
Quick Start
Prerequisites
- Docker Engine (docker CLI)
docker composeplugin (for compose)
Check what's running
docker ps -a --format 'table {{.Names}} {{.Status}} {{.Ports}} {{.Image}}'
docker stats --no-stream # live resource usage
Inspect a container
docker inspect \x3Ccontainer> | jq '.[0].State' # status, exit code, health
docker inspect \x3Ccontainer> --format '{{json .Mounts}}' | jq .
Logs analysis
docker logs \x3Ccontainer> --tail 100 --since 5m
# Use docker-log-inspector.py for filtering:
python3 scripts/docker-log-inspector.py \x3Ccontainer> --since 30m --filter ERROR --summary
Clean up unused resources
# Standard cleanup
bash scripts/docker-cleanup.sh
# Aggressive cleanup (removes volumes + build cache)
bash scripts/docker-cleanup.sh --aggressive
# Preview only
bash scripts/docker-cleanup.sh --dry-run
Health check
bash scripts/docker-health.sh # all containers
bash scripts/docker-health.sh \x3Ccontainer-name> # single container
Common Tasks
Docker Compose workflows
docker compose up -d # start services
docker compose down -v # stop + remove volumes
docker compose logs -f --tail 50 # follow logs
docker compose ps # status
docker compose exec \x3Cservice> sh # shell into a service
docker compose build --no-cache \x3Csvc> # rebuild without cache
docker compose restart \x3Cservice> # restart one service
Port conflicts
# Find what's using a port
sudo lsof -i :\x3Cport>
docker ps --format '{{.Names}} {{.Ports}}' | grep \x3Cport>
# Fix: change port mapping in docker-compose.yml or stop conflicting container
Resource limits and OOM
docker inspect \x3Ccontainer> --format '{{json .HostConfig.Memory}}'
docker stats \x3Ccontainer> --no-stream
# Fix: add to docker-compose.yml
# deploy:
# resources:
# limits:
# memory: 512M
# cpus: '0.5'
Image management
docker images --format 'table {{.Repository}} {{.Tag}} {{.Size}} {{.CreatedSince}}'
docker image prune -a # remove all unused images
docker rmi \x3Cimage-id> # remove specific image
docker pull \x3Cimage>:\x3Ctag> # update image
docker build -t \x3Cname>:\x3Ctag> . # build
docker build --no-cache -t \x3Cname> . # force rebuild
Network troubleshooting
docker network ls
docker network inspect \x3Cnetwork>
# Test connectivity from a container:
docker exec \x3Ccontainer> ping \x3Cother-container>
docker exec \x3Ccontainer> curl -v http://service:port
Data volumes
docker volume ls
docker volume inspect \x3Cvolume>
docker run --rm -v \x3Cvolume>:/data alpine ls -la /data # inspect volume contents
Troubleshooting
Container exits immediately
docker logs \x3Ccontainer> # check exit reason
docker inspect \x3Ccontainer> --format '{{.State.ExitCode}}'
# Common causes:
# 0 → clean exit (expected?)
# 1 → application error (check logs)
# 137 → SIGKILL (OOM kill)
# 139 → segfault
Disk space issues
docker system df # disk overview
du -sh /var/lib/docker/containers/ # container overlay sizes
bash scripts/docker-cleanup.sh --aggressive
Container can't resolve DNS
docker exec \x3Ccontainer> cat /etc/resolv.conf
# Fix: add to docker-compose.yml
# dns:
# - 8.8.8.8
# - 1.1.1.1
Permission errors
# Add user to docker group
sudo usermod -aG docker $USER && newgrp docker
Resources
scripts/docker-cleanup.sh— Interactive cleanup with dry-run modescripts/docker-health.sh— Multi-container health overviewscripts/docker-log-inspector.py— Regex filtering + severity summary for logsreferences/compose-patterns.md— Docker Compose patterns and recipes
安全使用建议
Install only if you want the agent to help manage Docker on this machine. Ask before running cleanup, `docker compose down -v`, or any sudo/group-membership changes, and prefer dry-run or inspection commands before deleting resources. Treat container logs as untrusted and potentially sensitive.
功能分析
Type: OpenClaw Skill
Name: docker-ops-toolkit
Version: 1.0.2
The bundle provides standard Docker management utilities for container lifecycle management, health monitoring, and log analysis. The included scripts (docker-cleanup.sh, docker-health.sh, and docker-log-inspector.py) perform their stated functions using standard Docker CLI commands without any evidence of data exfiltration, persistence mechanisms, or malicious prompt injection.
能力评估
Purpose & Capability
The described purpose matches the artifacts: Docker lifecycle, health checks, log inspection, cleanup, and Compose troubleshooting. Some commands are inherently high-impact, such as pruning resources and removing volumes, but they are disclosed and aligned with Docker operations.
Instruction Scope
The instructions present command examples for inspection, cleanup, Compose operations, and troubleshooting. Destructive examples such as aggressive cleanup and `docker compose down -v` are visible rather than hidden, but users should approve them explicitly before use.
Install Mechanism
There is no install spec and no automatic setup, but the metadata under-declares the Docker and Compose CLI prerequisites that SKILL.md requires. This is a metadata gap, not evidence of hidden installation.
Credentials
Docker daemon operations are proportionate to the stated purpose, but Docker access can inspect logs, execute commands in containers, and remove local Docker resources.
Persistence & Privilege
The skill does not create background persistence, but it includes a troubleshooting command to add the user to the Docker group, which is a persistent privilege change.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install docker-ops-toolkit - 安装完成后,直接呼叫该 Skill 的名称或使用
/docker-ops-toolkit触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Fix: docker-health.sh now handles --help / -h flag
v1.0.1
Fix: docker-health.sh now handles --help flag properly
v1.0.0
Initial release: container management, health checks, log analysis, cleanup scripts, compose patterns
元数据
常见问题
Docker Ops 是什么?
Docker container lifecycle management, health checks, log analysis, cleanup, compose orchestration, and troubleshooting. Use when Codex needs to manage Docke... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 11 次。
如何安装 Docker Ops?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install docker-ops-toolkit」即可一键安装,无需额外配置。
Docker Ops 是免费的吗?
是的,Docker Ops 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Docker Ops 支持哪些平台?
Docker Ops 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Docker Ops?
由 ericlooi504(@ericlooi504)开发并维护,当前版本 v1.0.2。
推荐 Skills