Skip to content
Skills Library
DevOps & cloud · Building & coding

docker

/docker

Containerization guidance for multi-stage builds, non-root execution, dockerignore hygiene, layer caching, healthchecks, and secret handling. Use when writing or reviewing Dockerfiles and container images.

Licence
MIT
Last repository change
12.05.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.05.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Containerization guidance for multi-stage builds, non-root execution, dockerignore hygiene, layer caching, healthchecks, and secret handling. Use when writing or reviewing Dockerfiles and container images.

Original author description

Containerization guidance for multi-stage builds, non-root execution, dockerignore hygiene, layer caching, healthchecks, and secret handling. Use when writing or reviewing Dockerfiles and container images.

How it works

  1. When to Activate
  2. Base Images and Layering
  3. Runtime Hardening
  4. Ignore List
  5. Checklist
Original SKILL.md headings · 97 lines, 410 words
SKILL.md preview
---
name: docker
description: Containerization guidance for multi-stage builds, non-root execution, dockerignore hygiene, layer caching, healthchecks, and secret handling. Use when writing or reviewing Dockerfiles and container images.
---

# Docker

Build minimal, reproducible images that start fast, run as non-root, and separate build-time concerns from runtime behavior.

## When to Activate

- Write or refactor a Dockerfile
- Split build and runtime concerns
- Harden a container for production
- Improve Docker build cache performance
- Add container healthchecks
- Review secret handling in image builds
- Shrink image size and attack surface

## Base Images and Layering

| Use Case | Preferred | Avoid |
| --- | --- | --- |
| Production service | Distroless or slim runtime | Full distro with build toolchain |
| Build stage | Language-specific SDK image | Installing compilers in runtime image |
| Tiny static binary | `scratch` when feasible | Heavy general-purpose images |

| Order | Reason |
| --- | --- |
| Copy lockfiles first | Maximizes dependency cache hits |
| Install dependencies | Expensive step stays cached |
| Copy source later | Code changes do not bust dependency layer |

## Runtime Hardening

BAD

```dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY . .
CMD ["python", "main.py"]
```

GOOD

```dockerfile
FROM python:3.12-slim AS runtime
WORKDIR /app
RUN useradd --create-home appuser
COPY --chown=appuser:appuser . .
USER appuser
CMD ["python", "main.py"]
```

| Scenario | Rule |
| --- | --- |
| Build-time private dependency access | Use ephemeral build secrets if available |
| Runtime credentials | Inject via environment or secret store |
| Static secret in Dockerfile | Never do it |

| Preferred | Avoid |
| --- | --- |
| Application-level readiness endpoint | Checking only whether PID exists |
| Fast, dependency-light command | Heavy scripts that change container state |

## Ignore List

| Always Ignore |
| --- |
| `.git` |
| `node_modules` |
| `.venv` |
| test artifacts |
| local secrets and `.env` files |

BAD

```dockerfile
COPY . .
RUN npm install
```

GOOD

```dockerfile
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
```

## Checklist

- [ ] Dockerfile uses multi-stage builds when build tooling is required
- [ ] Dependency layers are copied before application source
- [ ] Runtime image uses a non-root user
- [ ] `.dockerignore` excludes local junk and secrets
- [ ] Secrets are injected at runtime or via build secret facilities
- [ ] Healthcheck verifies real service readiness
- [ ] Base image is minimal for the workload

Versions

RepositoryScoreLicence
This page · kid-sid/codex-spellbook100MIT
event4u-app/agent-config100MIT
ericrisco/rsc-harness100MIT
atomicbot-ai/atomic-agent100MIT
aleks-spv/sysaiadm_station100AGPL-3.0
companion-inc/feynman100MIT
claude-dev-suite/claude-dev-suite100MIT
greedychipmunk/agent-skills100MIT
poppyszn/dev-pops-skills100MIT

Database snapshot: 13.11.2026 · package version ccb8f54add52 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100docker-expert
    Expert Docker: Dockerfiles, multi-stage builds, image size/cache optimization, Compose, and container best practices. Trigger keywords: Docker, Dockerfile, container, image, multi-stage, layer cache, docker-compose, .dockerignore, entrypoint, distroless, non-root, healthcheck,…
  • 100docker-build-strategies
    Use this skill when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their build is slow, or they need to harden a container for production. Covers multi-stage builds, layer caching, .dockerignore, non-root users, and image size optimization.
  • 100docker-conventions
    Best practices and conventions for Docker, Dockerfiles, docker-compose, and containerization. Covers multi-stage builds, base image selection, layer optimization, .dockerignore, non-root users, CMD vs ENTRYPOINT, health checks, environment configuration, image security scanning,…
  • 100docker-workflows
    Reviews and hardens Dockerfiles and docker-compose files — multi-stage build conversion, base-image choice, layer caching, secret leakage, root-user containers, missing healthchecks. Use when reviewing a Dockerfile, optimizing image size or build time, writing a compose file, or…
  • 100docker-expert
    Expert in Docker containerization including Dockerfile optimization, multi-stage builds, Docker Compose, and container security. Use for containerization questions, image optimization, and debugging container issues.
  • 100containerization
    Packages an application into a container image that is small, reproducible, and safe to run — Dockerfiles, layer caching, multi-stage builds, non-root users, and runtime configuration. Use this whenever the user is writing a Dockerfile, mentions Docker or OCI images, image size…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.