dockerfile-optimise

Apply 48 Dockerfile optimization rules across 8 categories.

193|17|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/pproenca/dot-skills --skill dockerfile-optimise
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dockerfile-optimise
Source: https://github.com/pproenca/dot-skills/tree/main/skills/.experimental/dockerfile-optimise
Command: npx skills add https://github.com/pproenca/dot-skills --skill dockerfile-optimise

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you write more efficient, secure, and smaller Docker images by applying best practices for Dockerfile construction.

Core Features & Use Cases

  • Build Time Optimization: Reduce build times through effective layer caching and multi-stage builds.
  • Image Size Reduction: Minimize image size by using minimal base images and cleaning up build artifacts.
  • Security Hardening: Implement best practices like running as a non-root user and avoiding secret leaks.
  • Use Case: You're building a new Docker image for your web application. Use this Skill to ensure your Dockerfile follows best practices for faster builds and a smaller, more secure final image.

Quick Start

Apply Dockerfile optimization best practices to the provided Dockerfile.

Frequently Asked Questions about dockerfile-optimise

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a Dockerfile to reduce image size and speed up build time?

To optimize a Dockerfile for size and speed, apply best practices like multi-stage builds, effective layer caching, and minimal base images. This Skill evaluates Dockerfiles against 48 rules across 8 categories to ensure efficient builds.

What are the best practices for securing a Docker build in a CI/CD pipeline?

Securing a Docker build involves running as a non-root user and avoiding secret leaks. This Skill applies security hardening rules to your Dockerfile, ensuring robust and safe integration within your CI/CD pipeline.

How does multi-stage build improve Docker layer caching?

Multi-stage builds improve Docker layer caching by separating build dependencies from runtime requirements, allowing frequently changing layers to cache independently. This Skill targets these instruction patterns to minimize final image size and build time.

Can I use this Dockerfile optimization tool for refactoring existing Docker images?

Yes, you can use this tool to refactor existing Dockerfiles. It targets scenarios involving Dockerfile creation and refactoring, validating quality and applying rules for context management, dependency handling, and base image selection.

Why does my Docker build take so long and how can I fix it?

Your Docker build may take long due to inefficient layer caching or large base images. This Skill optimizes build time by applying official Docker documentation best practices for context management and instruction patterns.

Does dockerfile-optimise work without external dependencies?

Yes, dockerfile-optimise works without external dependencies. It uses internal references and assets to apply 48 optimization rules across categories like base image selection, security, and quality validation.