Skip to content
Back to skills

Docker Patterns

ASecurity

Docker patterns - Dockerfile best practices, multi-stage builds, Compose service configuration, networking, volumes, and security. Use whenever the project contains a `Dockerfile`, a Compose file, or `.dockerignore`, OR the user asks about containers, image builds, or Compose service wiring, even if Docker is not mentioned by name.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
ai-agentsdockersecurity

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add ku5ic/claude-kit --skill docker-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docker Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docker Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ku5ic-docker-patterns/badge)](https://www.skillsdirectory.com/skills/ku5ic-docker-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: docker-patterns
description: Docker patterns - Dockerfile best practices, multi-stage builds, Compose service configuration, networking, volumes, and security. Use whenever the project contains a `Dockerfile`, a Compose file, or `.dockerignore`, OR the user asks about containers, image builds, or Compose service wiring, even if Docker is not mentioned by name.
---

# Docker patterns

Docker Engine 29.8.1. Compose Specification (current format, supersedes 2.x and 3.x). Verify at https://docs.docker.com/engine/release-notes/ and https://docs.docker.com/compose/compose-file/.

## Reference files

| File                                           | Covers                                                                                       |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [dockerfile.md](reference/dockerfile.md)       | Base image selection, layer caching, RUN/COPY/ADD/CMD/ENTRYPOINT/USER/WORKDIR, .dockerignore |
| [multi-stage.md](reference/multi-stage.md)     | Multi-stage builds, named stages, COPY --from, --target, BuildKit                            |
| [compose.md](reference/compose.md)             | Services, build, ports, depends_on with healthcheck, restart, env_file, profiles, secrets    |
| [networking.md](reference/networking.md)       | Bridge/host/none drivers, user-defined networks, service discovery, port publishing          |
| [volumes.md](reference/volumes.md)             | Named volumes vs bind mounts vs tmpfs, when to use each, Compose volume declarations         |
| [security.md](reference/security.md)           | Non-root user, minimal base images, image pinning, .dockerignore, Docker Scout, secrets      |
| [anti-patterns.md](reference/anti-patterns.md) | Severity-labeled anti-patterns to flag in review                                             |

## References

- https://docs.docker.com/build/building/best-practices/
- https://docs.docker.com/compose/compose-file/
- https://docs.docker.com/engine/network/
- https://docs.docker.com/engine/storage/

## Version notes

Checked: 2026-09-26 against https://docs.docker.com/engine/release-notes/ and https://docs.docker.com/compose/compose-file/04-version-and-name/

Docker Engine and Docker Compose release independently. The Compose Specification supersedes the versioned format (version: "3") -- the `version` top-level key is now ignored.

- 29.8.1 (2026-09-15): bug fixes only (containerd image store, logging, networking); no guidance change.
- 29.4.2 (2026-05-01): previous baseline.

Files in this skill

  • SKILL.md2.6 KB
  • reference/anti-patterns.md3.2 KB
  • reference/compose.md4 KB
  • reference/dockerfile.md4.4 KB
  • reference/multi-stage.md2.5 KB
  • reference/networking.md2.5 KB
  • reference/security.md3.8 KB
  • reference/volumes.md2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.