Dockerfile Optimise
Comprehensive Dockerfile optimization guidelines from official Docker docs covering build speed, image size, and security.
- CCM score
- 46 of 100
- skills.sh installs
- 365
- GitHub stars
- 228
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers 48 rules across 8 categories: layer caching, multi-stage builds, base images, build context, security, dependencies, instructions, and validation
- Includes per-rule reference files with explanations and code examples, ordered by impact from CRITICAL to MEDIUM
- Enforces patterns such as copying dependency files before source, using secret and SSH mounts, and running as a non-root user
- Designed for writing, reviewing, or refactoring Dockerfiles and Docker build pipelines
Install
$ npx -y skills add pproenca/dot-skills --skill dockerfile-optimise -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Layer Caching & Ordering | CRITICAL | cache- |
| 2 | Multi-Stage Builds | CRITICAL | stage- |
| 3 | Base Image Selection | HIGH | base- |
| 4 | Build Context Management | HIGH | ctx- |
| 5 | Security & Secrets | HIGH | sec- |
| 6 | Dependency Management | MEDIUM-HIGH | dep- |
| 7 | Instruction Patterns | MEDIUM | inst- |
| 8 | Quality & Validation | MEDIUM | lint- |
Details
- Repository
- github.com/pproenca/dot-skills
- Category
- DevOps & Cloud
- First seen
- Jun 3, 2026
Questions
What does the dockerfile-optimise skill do?
The dockerfile-optimise skill gives an agent Dockerfile optimization guidelines drawn from official Docker documentation. It covers build time, image size, security and robustness, and is used when writing, reviewing or refactoring Dockerfiles. The guidance spans 48 rules in 8 categories, from layer caching to multi-stage builds and secret mounts.
How do I install the dockerfile-optimise skill?
Run npx -y skills add pproenca/dot-skills --skill dockerfile-optimise -y in your project to install it. Once installed, the agent can apply its Dockerfile guidelines whenever you create, review or refactor a Dockerfile. It triggers on tasks about multi-stage builds, build cache and Docker security hardening.
Which skills does dockerfile-optimise compete with in DevOps & Cloud?
The skill sits in the DevOps & Cloud category, where the other top skills listed are azure-diagnostics, azure-prepare, azure-deploy, azure-validate and azure-storage. Those cover Azure workflows, while dockerfile-optimise focuses on image build and container practices. It is a fit when your work centers on writing or tuning Dockerfiles.
More from pproenca/dot-skills
All 100- Uniwind358
- Orval351
- 37signals Rails350
- Ast Grep349
- Codemod344
- Mui Base344
- Skill Authoring343
- Vhs340
- Unix Cli337
- 12 Factor App336
- Rust Refactor334
- Python332
- Ios Design System331
- Js Google327
- Tailwind Refactor324
- Pulumi320
- Harness Engineering315
- Ios Hig313
- Rails Testing312
- Ios Xcode310
- Ruby Refactor310
- Think310
- Restful Hateoas307
- Ios Ui Refactor303
Similar to Dockerfile Optimise
More DevOps & Clouddockerfile-optimizerpatricio0312rev/skills557 installsOptimizes Dockerfiles with multi-stage builds, layer caching, and security hardening for smaller production images.
multi-stage-dockerfilegithub/awesome-copilot31.9K installsGuided Dockerfile design that splits builds into stages for smaller, more secure runtime images.
docker-expertdavila7/claude-code-templates900 installsComprehensive Docker containerization guidance covering multi-stage builds, image size reduction, container hardening, and Compose orchestration.
docker-security-guidejosiahsiegel/claude-plugin-marketplace644 installsComprehensive Docker security guide covering image hardening, scanning, secrets, networking, and CIS compliance.
dockermindrally/skills1.2K installsContainerization guidance covering image builds, hardening, Compose workflows, and CI/CD practices for Docker.
docker-developmentalirezarezvani/claude-skills737 installsOpinionated Docker workflow for optimizing, composing, and hardening Dockerfiles and compose files.