container-ops

container-ops is a skill for Claude Code, Codex from chaterm/terminal-skills. It costs 11 tokens per session (927 once invoked), scanned A, original, Apache-2.0.

A reference for operating Docker containers, which are isolated environments used to run applications and their dependencies. It covers starting, stopping, inspecting, entering, monitoring, and removing containers.

In plain words
What is it for?
Use it to run containers, map ports and folders, set environment variables, control restarts and resources, inspect processes, view logs, and clean up stopped containers.
Why use it?
It provides the commands needed to manage containers without having to remember Docker's command options.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to run containers, map ports and folders, set environment variables, control restarts and resources, inspect processes, view logs, and clean up stopped containers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaterm/terminal-skills/container-ops
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chaterm/terminal-skills --skill container-ops
Clone the repo
git clone --depth 1 https://github.com/chaterm/terminal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for container-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaterm/terminal-skills/container-ops/github.svg)](https://agentmods.dev/skills/chaterm/terminal-skills/container-ops)
Your own site
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/container-ops"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/container-ops/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for container-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/container-ops"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/container-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 927 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.00927
Opus 5 $0.00005 $0.00464
Sonnet 5 $0.00002 $0.00185
Haiku 4.5 $0.00001 $0.00093

Measured 9d ago against content hash 7dfae1701bb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

container-ops scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docker/container-ops/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker 容器操作

概述

Docker 容器的日常操作,包括生命周期管理、资源限制、日志查看等。

容器生命周期

# 运行容器
docker run -d --name myapp nginx
docker run -it --rm ubuntu bash

# 常用参数
docker run -d \
  --name myapp \
  -p 8080:80 \
  -v /host/path:/container/path \
  -e ENV_VAR=value \
  --restart unless-stopped \
  nginx

# 启停容器
docker start/stop/restart container_name
docker pause/unpause container_name

# 删除容器
docker rm container_name
docker rm -f container_name              # 强制删除
docker container prune                   # 清理停止的容器

容器查看

# 列出容器
docker ps                                # 运行中
docker ps -a                             # 所有
docker ps -q                             # 仅 ID
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"

# 容器详情
docker inspect container_name
docker inspect -f '{{.NetworkSettings.IPAddress}}' container_name

# 资源使用
docker stats
docker stats container_name
docker top container_name

容器交互

# 进入容器
docker exec -it container_name /bin/bash
docker exec -it container_name sh

# 执行命令
docker exec container_name ls -la

# 查看日志
docker logs container_name
docker logs -f container_name            # 实时跟踪
docker logs --tail 100 container_name    # 最后 100 行
docker logs --since 1h container_name    # 最近 1 小时

资源限制

# 内存限制
docker run -d --memory=512m nginx

# CPU 限制
docker run -d --cpus=1.5 nginx
docker run -d --cpu-shares=512 nginx

# 更新运行中容器
docker update --memory=1g container_name
docker update --cpus=2 container_name

文件操作

# 复制文件
docker cp container_name:/path/file ./local
docker cp ./local container_name:/path/

# 查看文件变更
docker diff container_name

# 导出容器
docker export container_name > container.tar
docker import container.tar myimage:tag

常见场景

场景 1:调试容器

# 1. 查看容器状态
docker inspect container_name | jq '.[0].State'

# 2. 查看日志
docker logs --tail 50 container_name

# 3. 进入容器排查
docker exec -it container_name sh

# 4. 查看进程
docker top container_name

场景 2:容器无法启动

# 查看退出原因
docker inspect container_name | jq '.[0].State.ExitCode'
docker inspect container_name | jq '.[0].State.Error'

# 查看日志
docker logs container_name

# 以交互模式启动排查
docker run -it --entrypoint sh image_name

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 157 lines · 11 tokens per session scan A 7dfae1701bb9

Subscribe to this mod's changes

container-ops is a skill published in the GitHub repository chaterm/terminal-skills (58 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 927 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

harbor

CLI toolkit for managing containerized LLM services. Use when the user wants to start, stop, configure, or manage AI/LLM services like Ollama, Open WebUI, llama.cpp, vLLM, LiteLLM, ComfyUI, and 250+ others. Triggers on requests to "run a model", "start ollama", "set up an LLM", "configure harbor", "manage services"…

av/harbor · 114 tokens

agentbox-info

Spin up isolated sandboxes ("boxes") for coding agents, run them in parallel, queue background runs with -i, and push commits safely through the host relay. Use when the user wants to run Claude Code / Codex / OpenCode in a sandbox, start more boxes, attach to a running box, or otherwise operate the agentbox CLI on…

madarco/agentbox · 79 tokens

Cloud Security & Container Hardening

AWS/Azure/GCP security auditing, container and Kubernetes hardening, Infrastructure as Code scanning, and cloud compliance assessment.

Masriyan/Claude-Code-CyberSecurity-Skill · 30 tokens

docker-debugger

Debug Docker containers, fix Dockerfile issues, optimize images, and troubleshoot docker-compose. Use when having Docker problems, container issues, or optimizing Docker builds.

OneWave-AI/claude-skills · 35 tokens

agentbox

Fork the current agent session into a new VM or local Docker container with all the project files, agent settings and session teleported into.

madarco/agentbox · 30 tokens

deployment

Use when taking an app from source to live: choosing the deploy target from requirements (Hetzner+Coolify vs Vercel vs a third), then wiring container → CI → registry → host with build secrets, healthchecks and rollback. NOT one platform's mechanics (that is coolify, vercel, railway, render), NOT the Dockerfile alone…

ericrisco/rsc-harness · 86 tokens