agentleFS
metaspartanmetaspartan/cybara/skills/docker-management/SKILL.md

docker-management

Skill38 starsChanged 5 months agoMITView on GitHub

Manage and debug Docker containers, images, volumes, networks, Compose stacks, and Dockerfile performance/safety.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this for container lifecycle operations, Compose stacks, image builds, logs, disk cleanup, and Dockerfile review.

    line 9
  2. Distinctive:

    If Docker is not running, stop and report that instead of guessing.

    line 19
  3. Very specific:

    Check status and exit code with docker ps -a or docker compose ps.

    line 39
  4. Distinctive:

    Read logs from the failing service only.

    line 40
  5. Very specific:

    No secrets in ARG, ENV, layers, or copied files.

    line 51
  6. Distinctive:

    Never run destructive cleanup without checking impact:

    line 58
  7. Very specific:

    Ask before docker system prune -a --volumes.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Docker Management

Use this for container lifecycle operations, Compose stacks, image builds, logs, disk cleanup, and Dockerfile review.

First Checks

docker --version
docker compose version
docker info

If Docker is not running, stop and report that instead of guessing.

Common Tasks

TaskCommand
Running containersdocker ps
All containersdocker ps -a
Logsdocker logs --tail 100 <name>
Follow logsdocker logs --tail 100 -f <name>
Shelldocker exec -it <name> /bin/sh
Inspectdocker inspect <name>
Statsdocker stats --no-stream
Compose statusdocker compose ps
Compose logsdocker compose logs --tail 100
Disk usagedocker system df

Debugging Flow

  1. Identify the failing container or service.
  2. Check status and exit code with docker ps -a or docker compose ps.
  3. Read logs from the failing service only.
  4. Inspect env, mounts, ports, healthcheck, restart policy, and network.
  5. Reproduce with the smallest command or Compose service.
  6. Fix the image/config and rebuild.

Dockerfile Review

Check for:

  • Pinned base image and runtime versions.
  • Multi-stage builds for compiled/bundled apps.
  • No secrets in ARG, ENV, layers, or copied files.
  • Non-root runtime user.
  • Small runtime image and explicit healthcheck where useful.
  • Dependency install before source copy when caching matters.

Cleanup Safety

Never run destructive cleanup without checking impact:

docker system df
docker image prune
docker container prune

Ask before docker system prune -a --volumes; it can remove data and rebuild caches.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.