docker-expert

Optimizes Dockerfiles, multi-stage builds, and Docker Compose configurations for containerized applications.

Updated May 22, 2026
One-click install
npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill docker-expert-viniciuscs84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-expert
Source: https://github.com/viniciuscs84/sdd-toolkit/tree/main/skills/docker-expert
Command: npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill docker-expert-viniciuscs84

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Container builds often suffer from bloated images, broken layer caching, security issues from running as root, and race conditions between services. This Skill provides structured workflows to write efficient Dockerfiles, design multi-stage builds, and orchestrate services with Docker Compose correctly. ## Core Features & Use Cases - Dockerfile Optimization: Order layers by change frequency, mount BuildKit package manager caches, consolidate RUN commands, and create .dockerignore files to keep builds fast and images small. - Multi-Stage Builds: Separate dependency, build, and production stages so build tools stay out of the final image, reducing a Node app from roughly 1GB to around 150MB. - Compose Orchestration: Define health checks, isolated internal networks, resource limits, and split dev/prod configurations with compose override files. - Use Case: You have a Node.js API with Postgres. Use this Skill to produce an optimized production Dockerfile with a non-root user and health check, plus a Compose setup where the app waits for the database to be healthy before starting. ## Quick Start Use the docker-expert skill to write an optimized multi-stage Dockerfile and Compose setup for my Node.js API with a Postgres database.

Frequently Asked Questions about docker-expert

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

FAQPage Schema
How do I optimize a Dockerfile for faster builds?

Order layers by change frequency: copy package manifests and install dependencies before copying source code so the dependency layer stays cached. Add a .dockerignore file and use BuildKit cache mounts for the package manager to avoid re-downloading dependencies.

How do I reduce Docker image size with multi-stage builds?

Use separate named stages for dependencies, build, and production, then copy only final artifacts into the production stage. A Node app on alpine can drop from roughly 1GB to around 150MB by keeping build tools and devDependencies out of the final image.

Why does my Docker Compose app start before the database is ready?

This race condition happens when depends_on is used without a health check. Add a healthcheck to the database service, such as pg_isready for Postgres, and set condition: service_healthy on the dependent service.

How do I separate dev and prod Docker Compose configs?

Keep a base compose.yml, let compose.override.yml auto-merge for development with volume mounts and debug ports, and create a compose.prod.yml applied with -f flags for production. Validate the merged result with docker compose config before running.

When should I not use this Docker skill?

This skill does not cover Kubernetes or Helm, GitHub Actions CI/CD pipelines, or cloud-specific container services like AWS ECS and Fargate. Those scenarios belong to dedicated Kubernetes, CI/CD, or cloud DevOps skills.