docker-expert

Optimizes Dockerfiles with multi-stage builds and security hardening for deployments.

Updated Apr 9, 2024
One-click install
npx skills add https://github.com/nhonvo/Powershell --skill docker-expert-nhonvo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-expert
Source: https://github.com/nhonvo/Powershell/tree/main/antigrafity-config/.agent/skills/docker-expert
Command: npx skills add https://github.com/nhonvo/Powershell --skill docker-expert-nhonvo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Docker containerization and orchestration can be error-prone and inefficient; this Skill provides practical guidance to optimize builds, harden security, and produce production-ready container workflows.

Core Features & Use Cases

  • Optimized Dockerfiles with multi-stage builds to minimize final image size and reduce attack surface.
  • Container security hardening, including non-root execution, secrets handling, and minimal base images.
  • Docker Compose and orchestration patterns for reliable service startup, networking, and scaling.
  • DevOps-friendly workflows: build caching, multi-platform builds, and deployment readiness.

Quick Start

Review the Docker project and return a complete optimization plan with a multi-stage build and security hardening steps.

Frequently Asked Questions about docker-expert

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

FAQPage Schema
How do I optimize Docker image size using multi-stage builds?

Multi-stage builds optimize Docker image size by copying only necessary compiled artifacts from a builder stage to a minimal final base image, stripping out build dependencies and reducing the final image attack surface.

What's the best way to harden Docker container security for production?

Docker container security hardening for production involves using minimal base images, enforcing non-root execution, and securely handling secrets. These steps minimize vulnerabilities and restrict runtime privileges across staging and production environments.

How do I configure Docker Compose for reliable service startup and scaling?

Configuring Docker Compose for reliable startup and scaling requires defining orchestration patterns for service dependencies, networking, and health checks. This ensures robust service startup and consistent scaling across development, staging, and production environments.

Does this Docker optimization approach work with Swarm orchestration setups?

Yes, this approach applies robust orchestration patterns to both Docker Compose and Swarm setups. It ensures reliable service startup, networking, and scaling across development, staging, and production environments.

Why does my Docker build produce large images with security vulnerabilities?

Large Docker images with vulnerabilities often result from using unoptimized single-stage builds and bloated base images. Implementing multi-stage builds, minimal base images, and non-root execution hardening reduces image size and removes the attack surface.