据 AlphaMoat 统计,截至 2026-09,Portainer 累计下载 4,605 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 2,070 位,在「运维安全」分类(264 个)中排名第 111 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 153 | 4,570 | 3 | - |
| SkillHub ↗ | 248 | 4,605 | 3 | — |
各平台的计数口径不同,统计时间不一致。
通过 Portainer API 查看 Docker 容器和堆栈、启动或停止服务、查看日志并重新部署。操作可能影响线上服务;执行前确认目标环境、容器和影响范围,变更前优先检查状态与日志。
资料发布于 2026-10-27
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 4,605 | — | 3 |
| 2026-08 | 4,452 | +3.6% | 3 |
| 2026-07 | 4,298 | — | 3 |
| 2026-05 | 3,902 | — | 3 |
| 2026-03 | 3,281 | — | 3 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: portainer
description: Control Docker containers and stacks via Portainer API. List containers, start/stop/restart, view logs, and redeploy stacks from git.
metadata: {"clawdbot":{"emoji":"🐳","requires":{"bins":["curl","jq"],"env":["PORTAINER_API_KEY"]},"primaryEnv":"PORTAINER_API_KEY"}}
---
# 🐳 Portainer Skill
```
╔═══════════════════════════════════════════════════════════╗ ║ ║
║ 🐳 P O R T A I N E R C O N T R O L C L I 🐳 ║
║ ║
║ Manage Docker containers via Portainer API ║
║ Start, stop, deploy, redeploy ║
║ ║
╚═══════════════════════════════════════════════════════════╝
```
> *"Docker containers? I'll handle them from my lily pad."* 🐸
---
## 📖 What Does This Skill Do?
The **Portainer Skill** gives you control over your Docker infrastructure through Portainer's REST API. Manage containers, stacks, and deployments without touching the web UI.
**Features:**
- 📊 **Status** — Check Portainer server status
- 🖥️ **Endpoints** — List all Docker environments
- 📦 **Containers** — List, start, stop, restart containers
- 📚 **Stacks** — List and manage Docker Compose stacks
- 🔄 **Redeploy** — Pull from git and redeploy stacks
- 📜 **Logs** — View container logs
---
## ⚙️ Requirements
| What | Details |
|------|---------|
| **Portainer** | Version 2.x with API access |
| **Tools** | `curl`, `jq` |
| **Auth** | API Access Token |
### Setup
1. **Get API Token from Portainer:**
- Log into Portainer web UI
- Click username → My Account
- Scroll to "Access tokens" → Add access token
- Copy the token (you won't see it again!)
2. **Configure credentials:**
```bash
# Add to ~/.clawdbot/.env
PORTAINER_URL=https://your-portainer-server:9443
PORTAINER_API_KEY=ptr_your_token_here
```
3. **Ready!** 🚀
---
## 🛠️ Commands
### `status` — Check Portainer Server
```bash
./portainer.sh status
```
**Output:**
```
Portainer v2.27.3
```
---
### `endpoints` — List Environments
```bash
./portainer.sh endpoints
```
**Output:**
```
3: portainer (local) - ✓ online
4: production (remote) - ✓ online
```
---
### `containers` — List Containers
```bash
# List containers on default endpoint (4)
./portainer.sh containers
# List containers on specific endpoint
./portainer.sh containers 3
```
**Output:**
```
steinbergerraum-web-1 running Up 2 days
cora-web-1 running Up 6 weeks
minecraft running Up 6 weeks (healthy)
```
---
### `stacks` — List All Stacks
```bash
./portainer.sh stacks
```
**Output:**
```
25: steinbergerraum - ✓ active
33: cora - ✓ active
35: minecraft - ✓ active
4: pulse-website - ✗ inactive
```
---
### `stack-info` — Stack Details
```bash
./portainer.sh stack-info 25
```
**Output:**
```json
{
"Id": 25,
"Name": "steinbergerraum",
"Status": 1,
"EndpointId": 4,
"GitConfig": "https://github.com/user/repo",
"UpdateDate": "2026-01-25T08:44:56Z"
}
```
---
### `redeploy` — Pull & Redeploy Stack 🔄
```bash
./portainer.sh redeploy 25
```
**Output:**
```
✓ Stack 'steinbergerraum' redeployed successfully
```
This will:
1. Pull latest code from git
2. Rebuild containers if needed
3. Restart the stack
---
### `start` / `stop` / `restart` — Container Control
```bash
# Start a container
./portainer.sh start steinbergerraum-web-1
# Stop a container
./portainer.sh stop steinbergerraum-web-1
# Restart a container
./portainer.sh restart steinbergerraum-web-1
# Specify endpoint (default: 4)
./portainer.sh restart steinbergerraum-web-1 4
```
**Output:**
```
✓ Container 'steinbergerraum-web-1' restarted
```
---
### `logs` — View Container Logs
```bash
# Last 100 lines (default)
./portainer.sh logs steinbergerraum-web-1
# Last 50 lines
./portainer.sh logs steinbergerraum-web-1 4 50
```
---
## 🎯 Example Workflows
### 🚀 "Deploy Website Update"
```bash
# After merging PR
./portainer.sh redeploy 25
./portainer.sh logs steinbergerraum-web-1 4 20
```
### 🔧 "Debug Container"
```bash
./portainer.sh containers
./portainer.sh logs cora-web-1
./portainer.sh restart cora-web-1
```
### 📊 "System Overview"
```bash
./portainer.sh status
./portainer.sh endpoints
./portainer.sh containers
./portainer.sh stacks
```
---
## 🔧 Troubleshooting
### ❌ "Authentication required / Repository not found"
**Problem:** Stack redeploy fails with git auth error
**Solution:** The stack needs `repositoryGitCredentialID` parameter. The script handles this automatically by reading from the existing stack config.
---
### ❌ "Container not found"
**Problem:** Container name doesn't match
**Solution:** Use exact name from `./portainer.sh containers`:
- Include the full name: `steinbergerraum-web-1` not `steinbergerraum`
- Names are case-sensitive
---
### ❌ "PORTAINER_URL and PORTAINER_API_KEY must be set"
**Problem:** Credentials not configured
**Solution:**
```bash
# Add to ~/.clawdbot/.env
echo "PORTAINER_URL=https://your-server:9443" >> ~/.clawdbot/.env
echo "PORTAINER_API_KEY=ptr_your_token" >> ~/.clawdbot/.env
```
---
## 🔗 Integration with Clawd
```
"Redeploy the website"
→ ./portainer.sh redeploy 25
"Show me running containers"
→ ./portainer.sh containers
"Restart the Minecraft server"
→ ./portainer.sh restart minecraft
"What stacks do we have?"
→ ./portainer.sh stacks
```
---
## 📜 Changelog
| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | 2026-01-25 | Initial release |
---
## 🐸 Credits
```
@..@
(----)
( >__< ) "Containers are just fancy lily pads
^^ ^^ for your code to hop around!"
```
**Author:** Andy Steinberger (with help from his Clawdbot Owen the Frog 🐸)
**Powered by:** [Portainer](https://portainer.io/) API
**Part of:** [Clawdbot](https://clawdhub.com) Skills Collection
---
<div align="center">
**Made with 💚 for the Clawdbot Community**
*Ribbit!* 🐸
</div>
在使用技能包之前做安全扫描,并按结论决定放行或拦截的技能。
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
备份与恢复 OpenClaw 配置、凭据与工作区的技能。
配置并使用 1Password CLI 处理密钥。
一款被描述为可检测提示注入与危险命令的 OpenClaw 安全插件。
远程控制 tmux 会话,向交互式命令行发送按键并抓取输出。
以应用安全工程师视角做代码与架构的安全审计。
管理腾讯云对象存储与数据万象的技能。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。