docker-expert

Diagnoses and optimizes Dockerfiles, container security, and Docker Compose orchestration configurations.

Updated Nov 30, 2025
One-click install
npx skills add https://github.com/Amakaflow/amakaflow-dev-workspace --skill docker-expert-amakaflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-expert
Source: https://github.com/Amakaflow/amakaflow-dev-workspace/tree/main/.claude/skills/docker-expert
Command: npx skills add https://github.com/Amakaflow/amakaflow-dev-workspace --skill docker-expert-amakaflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Container configurations often suffer from bloated images, security vulnerabilities, slow builds, and fragile orchestration setups that are hard to diagnose without deep Docker expertise. ## Core Features & Use Cases - Dockerfile Optimization: Applies multi-stage builds, layer caching strategies, and base image selection to reduce image size and build time. - Security Hardening: Configures non-root users, secrets management, and minimal attack surfaces following container security best practices. - Compose Orchestration: Designs service dependencies, health checks, networks, and resource limits for development and production environments. - Use Case: When a Node.js production image exceeds 1GB, the skill restructures the Dockerfile into a multi-stage build with a distroless runtime, cutting the image to a fraction of its size. ## Quick Start Ask the assistant to review your Dockerfile and docker-compose.yml for optimization and security issues.

Frequently Asked Questions about docker-expert

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

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

Multi-stage builds separate dependency installation, compilation, and runtime into distinct stages, copying only necessary artifacts into the final image. Combining this with distroless or Alpine base images and cleaning package manager caches in the same RUN layer significantly reduces size.

How to run Docker containers as a non-root user?

Create a dedicated user with a specific UID/GID using addgroup and adduser, then set the USER directive before the CMD instruction. Copy files with --chown flags so the application user owns its working directory.

Does Docker Compose support service startup ordering?

Yes, Compose supports startup ordering through depends_on with the service_healthy condition combined with healthcheck definitions. This ensures dependent services like databases are ready before the application container starts.

Why is my Docker build so slow?

Slow builds usually result from poor layer ordering, large build contexts without a .dockerignore file, or missing cache strategies. Copy dependency manifests before source code and use BuildKit cache mounts for package managers.

When should I use Kubernetes instead of Docker Compose?

Docker Compose suits single-host development and small deployments, while Kubernetes is needed for multi-node orchestration, autoscaling, and advanced ingress management. This skill defers Kubernetes-specific questions to a dedicated orchestration expert.