← Back to Skills Marketplace
openlang-cn

Docker Cli

by openlang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
332
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install docker-cli
Description
Helper for using the Docker CLI to build, run, stop, inspect, and manage containers and images. Use when the user wants to perform container-related tasks fr...
README (SKILL.md)

\r \r

Docker CLI Helper\r

\r This skill explains how to use the Docker command line for common container workflows.\r \r

When to Use\r

\r Use this skill when:\r \r

  • The user wants to build or rebuild a Docker image.\r
  • The user wants to run a container (one-off or long-running).\r
  • The user wants to see which containers/images/volumes exist.\r
  • The user wants to stop or remove containers/images.\r
  • The user wants to see logs, exec into a container, or check resource usage.\r \r

Requirements\r

\r

  • Docker is installed and running.\r
  • docker version or docker info works in the user’s shell.\r \r If unsure, suggest the user run:\r \r
docker version\r
```\r
\r
to confirm Docker is available.\r
\r
## Safety Guidelines\r
\r
- Prefer **read-only** or non-destructive commands first:\r
  - `docker ps`, `docker ps -a`\r
  - `docker images`\r
  - `docker logs`\r
  - `docker inspect`\r
- Be cautious with destructive commands:\r
  - `docker rm`, `docker rmi`\r
  - `docker system prune`\r
  - `docker volume rm`\r
- Only recommend destructive cleanups when the user explicitly wants to free resources and understands what will be removed.\r
\r
## Common Workflows\r
\r
### 1. List and inspect containers\r
\r
List running containers:\r
\r
```bash\r
docker ps\r
```\r
\r
List all containers (including stopped):\r
\r
```bash\r
docker ps -a\r
```\r
\r
Inspect a container in detail:\r
\r
```bash\r
docker inspect \x3Ccontainer-id-or-name>\r
```\r
\r
### 2. List and inspect images\r
\r
List local images:\r
\r
```bash\r
docker images\r
```\r
\r
Inspect an image:\r
\r
```bash\r
docker inspect \x3Cimage-id-or-name>\r
```\r
\r
### 3. Build images\r
\r
Build an image from a `Dockerfile` in the current directory:\r
\r
```bash\r
docker build -t \x3Cimage-name>:\x3Ctag> .\r
```\r
\r
Example:\r
\r
```bash\r
docker build -t my-app:latest .\r
```\r
\r
If the `Dockerfile` is in another directory:\r
\r
```bash\r
docker build -t my-app:latest path/to/context\r
```\r
\r
### 4. Run containers\r
\r
Run a container in the foreground:\r
\r
```bash\r
docker run --rm -it \x3Cimage-name>:\x3Ctag>\r
```\r
\r
Run in detached mode (background service):\r
\r
```bash\r
docker run -d --name \x3Ccontainer-name> \x3Cimage-name>:\x3Ctag>\r
```\r
\r
Map ports from container to host:\r
\r
```bash\r
docker run -d --name \x3Ccontainer-name> -p 8080:80 \x3Cimage-name>:\x3Ctag>\r
```\r
\r
Mount a host directory into the container:\r
\r
```bash\r
docker run -d --name \x3Ccontainer-name> -v /host/path:/container/path \x3Cimage-name>:\x3Ctag>\r
```\r
\r
### 5. Stop and remove containers\r
\r
Stop a running container:\r
\r
```bash\r
docker stop \x3Ccontainer-id-or-name>\r
```\r
\r
Remove a stopped container:\r
\r
```bash\r
docker rm \x3Ccontainer-id-or-name>\r
```\r
\r
Stop and remove in one shot (two commands):\r
\r
```bash\r
docker stop \x3Ccontainer-id-or-name>\r
docker rm \x3Ccontainer-id-or-name>\r
```\r
\r
### 6. Remove images\r
\r
Remove an image by ID or name:\r
\r
```bash\r
docker rmi \x3Cimage-id-or-name>\r
```\r
\r
Only suggest this when the user is sure the image is no longer needed.\r
\r
### 7. Logs and exec\r
\r
See logs for a container:\r
\r
```bash\r
docker logs \x3Ccontainer-id-or-name>\r
```\r
\r
Stream logs (follow):\r
\r
```bash\r
docker logs -f \x3Ccontainer-id-or-name>\r
```\r
\r
Execute a shell inside a running container (if it has `/bin/bash`):\r
\r
```bash\r
docker exec -it \x3Ccontainer-id-or-name> /bin/bash\r
```\r
\r
or with `/bin/sh`:\r
\r
```bash\r
docker exec -it \x3Ccontainer-id-or-name> /bin/sh\r
```\r
\r
### 8. Clean up resources\r
\r
Only suggest these when the user explicitly wants cleanup:\r
\r
- Remove all stopped containers:\r
\r
```bash\r
docker container prune\r
```\r
\r
- Remove unused images:\r
\r
```bash\r
docker image prune\r
```\r
\r
- Remove everything unused (containers, networks, images, and optionally volumes):\r
\r
```bash\r
docker system prune\r
```\r
\r
For a more aggressive cleanup, but only if the user confirms:\r
\r
```bash\r
docker system prune -a\r
```\r
\r
## Troubleshooting Tips\r
\r
- If images cannot be pulled, check:\r
  - Network connectivity.\r
  - Registry authentication (if using a private registry).\r
- If ports are already in use, suggest:\r
  - Changing the host port in `-p host:container`.\r
  - Or stopping the process that currently uses the port.\r
- If a container keeps exiting immediately:\r
  - Suggest checking `docker logs \x3Ccontainer>` for errors.\r
  - Inspect entrypoint and command configuration.\r
\r
Usage Guidance
This skill is coherent and simply documents Docker CLI commands. Before allowing an agent to execute any suggested commands, note: docker run -v (host mounts) and docker exec let processes access host files — only run those if you trust the agent and understand what host paths will be exposed. Be cautious with destructive commands (rmi, system prune) and confirm intent. No credentials or installs are required by the skill itself; it just assumes you have Docker available locally.
Capability Analysis
Type: OpenClaw Skill Name: docker-cli Version: 1.0.0 The skill bundle provides standard documentation and command templates for managing Docker containers and images via the CLI. It includes appropriate safety guidelines regarding destructive operations (e.g., pruning or removing resources) and lacks any indicators of malicious behavior, data exfiltration, or prompt injection. All instructions in SKILL.md are aligned with the stated purpose of assisting with Docker workflows.
Capability Assessment
Purpose & Capability
Name/description (Docker CLI helper) match the content: SKILL.md provides commands for building, running, inspecting, and cleaning up containers/images. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
Instructions stay within Docker CLI operations (build, run, logs, exec, prune). They do recommend high-privilege Docker actions such as mounting host directories (-v) and docker exec into containers — these are expected for a Docker helper but can expose host data if executed. The instructions do not ask the agent to read arbitrary host files or environment variables beyond using Docker commands.
Install Mechanism
No install spec and no code files — instruction-only skill. Nothing is downloaded or written to disk by the skill itself.
Credentials
The skill requests no environment variables, credentials, or config paths. That is proportional for a CLI helper that uses the local Docker daemon.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request permanent presence or modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install docker-cli
  3. After installation, invoke the skill by name or use /docker-cli
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of docker-cli skill: - Provides guidance for using the Docker CLI to build, run, stop, inspect, and manage containers and images. - Includes common command examples for listing, inspecting, building, running, logging, and removing Docker containers and images. - Outlines safety guidelines to prevent accidental data loss with clear distinctions between safe and destructive commands. - Offers troubleshooting tips for common Docker issues. - Suggests verifying Docker installation before use.
Metadata
Slug docker-cli
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Docker Cli?

Helper for using the Docker CLI to build, run, stop, inspect, and manage containers and images. Use when the user wants to perform container-related tasks fr... It is an AI Agent Skill for Claude Code / OpenClaw, with 332 downloads so far.

How do I install Docker Cli?

Run "/install docker-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Docker Cli free?

Yes, Docker Cli is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Docker Cli support?

Docker Cli is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Docker Cli?

It is built and maintained by openlang (@openlang-cn); the current version is v1.0.0.

💬 Comments