← 返回
AI智能 中文

Docker Manager

Docker container lifecycle management. Use when: user asks to list containers, start/stop containers, view logs, check stats, prune unused containers or imag...
{ "answer": "Docker 容器生命周期管理。使用场景:用户请求列出容器、启动/停止容器、查看日志、检查统计信息、清理未使用的容器或镜像..." }
ppopen
AI智能 clawhub v1.0.0 1 版本 99871.1 Key: 无需
★ 0
Stars
📥 775
下载
💾 16
安装
1
版本
#latest

概述

Docker Manager Skill

Manage Docker containers, images, and system resources.

Triggers

  • "docker containers", "list containers"
  • "start container", "stop container"
  • "docker logs", "container logs"
  • "docker stats", "container stats"
  • "docker prune", "cleanup containers"
  • "docker images", "list images"

Commands

List Running Containers

docker ps

List All Containers (including stopped)

docker ps -a

Start a Container

docker start <container_id_or_name>

Stop a Container

docker stop <container_id_or_name>

Restart a Container

docker restart <container_id_or_name>

View Container Logs

# Tail last 100 lines
docker logs --tail 100 <container_id_or_name>

# Follow logs in real-time
docker logs -f <container_id_or_name>

Container Stats (CPU, Memory, Network)

# Stream stats for all running containers
docker stats

# Stats for specific container
docker stats <container_id_or_name>

# Non-streaming (one-time)
docker stats --no-stream <container_id_or_name>

List Docker Images

docker images

Prune Unused Containers

# Remove all stopped containers
docker container prune -f

Prune Unused Images

# Remove dangling images
docker image prune -f

# Remove all unused images
docker image prune -a -f

Docker System DF (Disk Usage)

docker system df

Bundled Scripts

docker-stats.sh

Script for formatted container stats output.

#!/bin/bash
# Docker container stats with formatted output

echo "Container Stats"
echo "==============="
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"

Usage Examples

IntentCommand
-----------------
List running containersdocker ps
List all containersdocker ps -a
Start nginx containerdocker start nginx
Stop nginx containerdocker stop nginx
View webapp logsdocker logs --tail 50 webapp
Monitor statsdocker stats
List imagesdocker images
Cleanup unused containersdocker container prune -f
Cleanup unused imagesdocker image prune -a -f
Check disk usagedocker system df

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 16:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Cron Scheduler

ppopen
管理 macOS/Linux 的 cron 任务——列出、添加、移除、备份及调度定时任务。
★ 0 📥 1,482
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,652
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,508