agentleFS
evolplusevolplus/talos/skills/docker-deployment/SKILL.md

docker-deployment

Skill9 starsChanged 6 months agoApache-2.0View on GitHub

Deploy Dockerfile or docker-compose based services for DevOps tasks. Use for local Docker deploys, remote Docker hosts reached through ssh-remote-operations, image build/pull/tag checks, docker compose release directories, health checks, rollback notes, and deploy reports while keeping `.env`, registry credentials, SSH credentials, and compose-resolved secrets out of model context.

  • Reads credentials

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Classify the target: If the target is local QA, follow local-deployment.

    line 23
  2. Very specific:

    Find project-owned Docker assets: Use the task and architecture docs to identify Dockerfile, compose.yml, docker-compose.yml, or …

    line 24
  3. Very specific:

    Validate environment inputs without secrets: Read safe templates (.env.example, .env.template, .env.sample) for key names only.

    line 25
  4. Distinctive:

    Use deterministic image references: Prefer immutable tags or digests.

    line 26
  5. Very specific:

    Scope Compose mutations: Always pass -p <project-slug> for compose mutations.

    line 27
  6. Distinctive:

    Health-check the actual surface: Use declared HTTP health endpoints, container health status, or application smoke probes.

    line 29
  7. Distinctive:

    Use SSH by reference:

    line 34
  8. Very specific:

    Do not inline private keys, passwords, registry tokens, or env values.

    line 42
  9. Very specific:

    Never read, print, copy, or create .env* secret files.

    line 46
  10. Very specific:

    Never run full docker compose config in model-visible output.

    line 47
  11. Distinctive:

    Never deploy unpinned images to staging or production unless an approved project policy allows it.

    line 48
  12. Very specific:

    Never run docker system prune, docker volume prune, or cross-project container cleanup on local or remote hosts.

    line 49
  13. Distinctive:

    Never copy SSH, Kubernetes, registry, or cloud credentials as part of Docker artifact staging.

    line 50
  14. Distinctive:

    Never declare success until health checks pass and rollback instructions are recorded.

    line 51

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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 Deployment

When to use

Use this skill when a DevOps task deploys a Dockerfile, a Docker image, or a Docker Compose stack. For the existing local QA environment flow, keep using local-deployment; use this skill when the task is broader than local QA, especially remote servers, staging-like hosts, image promotion, or compose-based releases.

Inputs and outputs

  • Inputs: task ID, target environment, Dockerfile or compose path, image tag or build source, environment contract, safe env templates, target host or SSH alias for remote deploys, and rollback expectation.
  • Outputs: built or pulled image evidence, compose validation result, running service health checks, rollback command, and docs/deploy-reports/<task-id>.md with redacted environment evidence.

Procedure

  1. Classify the target. If the target is local QA, follow local-deployment. If the target is a remote VM or server, first follow ssh-remote-operations for connectivity, approval, and remote command discipline. If the target is Kubernetes, use kubernetes-deployment instead.
  2. Find project-owned Docker assets. Use the task and architecture docs to identify Dockerfile, compose.yml, docker-compose.yml, or project-owned files under infra/ or deploy/. Do not create a new reusable infra layout unless the task explicitly asks for it.
  3. Validate environment inputs without secrets. Read safe templates (.env.example, .env.template, .env.sample) for key names only. Detect .env* presence by path/status only. Use docker compose config --quiet; never print full docker compose config because it can expand secrets.
  4. Use deterministic image references. Prefer immutable tags or digests. If building from a Dockerfile, record source commit, build target, platform, and final image tag. Do not deploy latest to a non-dev environment unless the architecture explicitly allows it.
  5. Scope Compose mutations. Always pass -p <project-slug> for compose mutations. Use a project-specific release directory on remote hosts, for example /opt/<project-slug>/releases/<task-id-or-version>. Never run global prune commands.
  6. Deploy with a reversible sequence. Pull/build, validate config, start/update services, wait for health checks, then capture logs only when needed and with redaction. Keep the previous image tag or release directory available for rollback.
  7. Health-check the actual surface. Use declared HTTP health endpoints, container health status, or application smoke probes. "Container is running" is not enough.
  8. Write the deploy report. Include target environment, host alias (not credentials), compose files, image references, platform, env-file status, health-check results, rollback command, and known limitations. Use names/statuses only for secret-bearing files.

Remote Docker pattern

Use SSH by reference:

ssh -F .ssh/config <host-alias> 'docker version'
ssh -F .ssh/config <host-alias> 'docker compose -p <project-slug> -f /opt/<project-slug>/current/compose.yml config --quiet'
ssh -F .ssh/config <host-alias> 'docker compose -p <project-slug> -f /opt/<project-slug>/current/compose.yml up -d --wait'

Do not inline private keys, passwords, registry tokens, or env values. If the remote host lacks Docker, install it only through ssh-remote-operations and only when the task approves software installation.

Hard rules

  • Never read, print, copy, or create .env* secret files. Safe templates are the only env files DevOps may read.
  • Never run full docker compose config in model-visible output; use config --quiet.
  • Never deploy unpinned images to staging or production unless an approved project policy allows it.
  • Never run docker system prune, docker volume prune, or cross-project container cleanup on local or remote hosts.
  • Never copy SSH, Kubernetes, registry, or cloud credentials as part of Docker artifact staging.
  • Never declare success until health checks pass and rollback instructions are recorded.

References

  • ../local-deployment/SKILL.md - local QA environment composition.
  • ../ssh-remote-operations/SKILL.md - remote command execution and package install rules.
  • ../../agents/_templates/devops.md - DevOps role contract and deploy-report schema.

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.