Docker イメージを管理する。「イメージ一覧」「docker images」「イメージ確認」「ビルドして」「docker build」「イメージ作成」「イメージ取得」「docker pull」「イメージダウンロード」「イメージの履歴」「docker history」などで起動。
/plugin marketplace add shiiman/claude-code-plugins/plugin install shiiman-docker@shiiman-claude-code-pluginsThis skill is limited to using the following tools:
Docker イメージの管理を行います。
| 操作 | トリガー例 | コマンド |
|---|---|---|
| 一覧表示 | 「イメージ一覧」「images」 | docker images |
| ビルド | 「ビルドして」「build」 | docker build |
| 取得 | 「イメージ取得」「pull」 | docker pull |
| 履歴 | 「イメージ履歴」「history」 | docker history |
ユーザーの発話から操作を判定:
docker imagesdocker builddocker pulldocker historydocker images --format "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.Size}}\t{{.CreatedSince}}"
dangling イメージも含める場合:
docker images -a --format "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.Size}}"
ビルド:
まず Dockerfile の存在確認:
ls Dockerfile docker-compose.yml compose.yml 2>/dev/null
docker-compose.yml がある場合:
docker compose build [service]
Dockerfile のみの場合:
docker build -t <tag> .
# または
docker build -t <tag> -f <dockerfile> .
オプション:
--no-cache: キャッシュなしでビルド--target <stage>: マルチステージビルドのターゲット指定イメージ取得:
docker pull <image>:<tag>
履歴表示:
docker history <image> --format "table {{.CreatedBy}}\t{{.Size}}"
## イメージ一覧
| リポジトリ | タグ | ID | サイズ | 作成日時 |
|-----------|------|-----|--------|----------|
| ... | ... | ... | ... | ... |
合計: {N} イメージ
総サイズ: {total_size}
## ビルド完了
イメージ: {repository}:{tag}
サイズ: {size}
レイヤー数: {layers}
ビルド時間: {duration}
## イメージ取得完了
イメージ: {image}:{tag}
ダイジェスト: {digest}
サイズ: {size}
latest タグの使用は避けることを推奨docker rmi -f は使用しない(cleanup コマンドに委譲)