docker-build

Create or optimize Dockerfiles with multi-stage builds and non-root users.

11|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill docker-build-berkcangumusisik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-build
Source: https://github.com/berkcangumusisik/claude-code-practices/tree/main/skills/docker-build
Command: npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill docker-build-berkcangumusisik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation or optimization of a Dockerfile for your project, saving time and ensuring best-practice patterns.

Core Features & Use Cases

  • Project type detection: Assess whether a Dockerfile exists and what base images or stages are needed.
  • Dockerfile generation and optimization: Create multi-stage builds, configure non-root users, and optimize layer caching and image size.
  • .dockerignore management: Update or create .dockerignore to exclude unnecessary files from builds.
  • Quick test and run commands: Provide commands to test the built image locally.

Quick Start

Run the docker-build skill in your project directory to create or update a Dockerfile following best practices.

Frequently Asked Questions about docker-build

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

FAQPage Schema
How do I create a Dockerfile for my project?

To create a Dockerfile, this skill inspects your project structure to detect the project type, then generates a Dockerfile configured with multi-stage builds, non-root users, and optimized layer caching to reduce image size.

What's the best way to optimize Docker image size?

Optimizing Docker image size is achieved by applying multi-stage builds, configuring non-root users, and optimizing layer caching, which this skill automates by analyzing your project's existing Docker-related files and structure.

How do I set up a .dockerignore file?

Setting up a .dockerignore file involves validating and updating or creating the file to exclude unnecessary files from your builds, which this skill handles automatically as part of the Dockerfile creation or optimization process.

Can I optimize an existing Dockerfile or do I need to start from scratch?

You can optimize an existing Dockerfile; the skill assesses whether a Dockerfile already exists and updates it with best-practice patterns like multi-stage builds and layer optimization without requiring you to start from scratch.

How do I test a Docker image after building it?

To test a Docker image after building, this skill provides quick test and run commands that you can execute locally to verify the built image functions correctly according to your project's detected configuration.

Does Dockerfile generation work for any project type?

Dockerfile generation works for various project types by detecting your project's specific structure and requirements, then adjusting the base images and build stages accordingly, whether or not a Dockerfile already exists.