dockerfile-best-practices
CommunityLean, secure Dockerfiles with proven patterns.
AuthorDaichiHoshina
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Dockerfile best practices to reduce image sizes, speed up builds, and strengthen security across Docker-based projects.
Core Features & Use Cases
- Multi-stage builds to shrink final images and separate build vs runtime environments.
- Cache optimization by ordering and consolidating RUN commands.
- .dockerignore to exclude unnecessary files and protect secrets.
- Security hardening with non-root users and minimal base images (Distroless/base variants).
- Optional vulnerability scanning and linting with Hadolint to improve quality.
- Comprehensive checklists and reference resources for consistent practices.
Quick Start
Follow these guidelines whenever you create or refactor a Dockerfile to minimize image size, improve security, and optimize builds.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dockerfile-best-practices Download link: https://github.com/DaichiHoshina/ai-tools/archive/main.zip#dockerfile-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.