skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
pproenca/dot-skills337 installs

dockerfile-optimise

Dockerfile optimization guidelines from official Docker documentation. This skill should be used when writing, reviewing, or refactoring Dockerfiles to ensure optimal build time, image size, security, and robustness. Triggers on tasks involving Dockerfile creation, Docker image builds, container optimization, multi-stage builds, build cache, or Docker security hardening.

How do I install this agent skill?

npx skills add https://github.com/pproenca/dot-skills --skill dockerfile-optimise
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill is an educational resource providing Dockerfile optimization guidelines sourced from official Docker documentation. It promotes security and performance best practices with no malicious functionality detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerwarn

    51/51 files flagged

  • ZeroLeakspass

    Score: 93/100 · 2 sections analyzed

What does this agent skill do?

Dockerfile Optimization Best Practices

Comprehensive Dockerfile optimization guide sourced exclusively from official Docker documentation. Contains 48 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Dockerfiles or modifying existing ones
  • Optimizing Docker build times (layer caching, cache mounts, context management)
  • Reducing Docker image size (multi-stage builds, minimal base images)
  • Hardening container security (secret mounts, non-root users, attestations)
  • Setting up CI/CD pipelines with Docker builds
  • Reviewing Dockerfiles for anti-patterns

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Layer Caching & OrderingCRITICALcache-
2Multi-Stage BuildsCRITICALstage-
3Base Image SelectionHIGHbase-
4Build Context ManagementHIGHctx-
5Security & SecretsHIGHsec-
6Dependency ManagementMEDIUM-HIGHdep-
7Instruction PatternsMEDIUMinst-
8Quality & ValidationMEDIUMlint-

Quick Reference

1. Layer Caching & Ordering (CRITICAL)

2. Multi-Stage Builds (CRITICAL)

3. Base Image Selection (HIGH)

4. Build Context Management (HIGH)

5. Security & Secrets (HIGH)

6. Dependency Management (MEDIUM-HIGH)

7. Instruction Patterns (MEDIUM)

8. Quality & Validation (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/pproenca/dot-skills/dockerfile-optimise">View dockerfile-optimise on skillZs</a>