Analyze Docker Build Errors logo

Analyze Docker Build Errors

Community
dykyi-roman
analyze-docker-build-errors

Analyzes Docker build errors for PHP projects. Identifies extension compilation failures, dependency issues, memory limits, and provides fixes.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill nameanalyze-docker-build-errors
Stars
98
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dykyi-roman on GitHub. Read the source before you install it.

Installation

Install the Analyze Docker Build Errors AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/analyze-docker-build-errors .claude/skills/analyze-docker-build-errors
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analyze Docker Build Errors in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analyze Docker Build Errors on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analyze Docker Build Errors is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Docker Build Error Analysis

Analyze Dockerfile and build logs for PHP project build failures and provide targeted fixes.

Common Build Error Patterns

Error CategorySymptomRoot Cause
Extension compilationconfigure: error: ...Missing dev packages
Package not foundE: Unable to locate packageWrong package name for base image
Permission deniedCOPY failed: permission deniedFile ownership or Docker socket
Memory exhaustedAllowed memory size exhaustedComposer or PHP memory limit
Context too largesending build context... 2GBMissing .dockerignore
Multi-stage failureCOPY --from=builder ... not foundWrong stage name or path

Detection Patterns

1. Extension Compilation Failure

dockerfile
# ERROR: gd extension on Alpine
RUN docker-php-ext-install gd
# configure: error: png.h not found

# FIX (Alpine):
RUN apk add --no-cache libpng-dev libjpeg-turbo-dev freetype-dev \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install -j$(nproc) gd

# FIX (Debian):
RUN apt-get update && apt-get install -y libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install -j$(nproc) gd

2. Extension Dependencies by Base Image

ExtensionAlpine PackagesDebian Packages
gdlibpng-dev libjpeg-turbo-dev freetype-devlibpng-dev libjpeg62-turbo-dev libfreetype6-dev
intlicu-devlibicu-dev
ziplibzip-devlibzip-dev
pdo_pgsqlpostgresql-devlibpq-dev
soaplibxml2-devlibxml2-dev
xsllibxslt-devlibxslt1-dev
imagickimagemagick-dev (PECL)libmagickwand-dev (PECL)

3. Memory Exhausted During Build

dockerfile
# ERROR: Composer runs out of memory
RUN composer install
# PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

# FIX: Increase memory limit for Composer
RUN php -d memory_limit=-1 /usr/bin/composer install --no-dev --optimize-autoloader

4. Context Too Large

dockerignore
# Required .dockerignore entries
.git
node_modules
vendor
var/cache
var/log
docker-compose*.yml
.env.local
tests
docs

5. Alpine Build Essentials

dockerfile
RUN apk add --no-cache --virtual .build-deps \
    $PHPIZE_DEPS build-base autoconf \
    && pecl install redis \
    && docker-php-ext-enable redis \
    && apk del .build-deps

Grep Patterns

bash
# Find Dockerfiles with extension installs
Grep: "docker-php-ext-install" --glob "**/Dockerfile*"

# Find missing dev package installs before ext-install
Grep: "ext-install.*(gd|intl|zip|pdo_pgsql|imagick)" --glob "**/Dockerfile*"

# Find unrestricted memory Composer runs
Grep: "composer install|composer update" --glob "**/Dockerfile*"

# Find large base images
Grep: "FROM php:[0-9.]+-apache|FROM php:[0-9.]+-cli$" --glob "**/Dockerfile*"

# Check for .dockerignore existence
Glob: "**/.dockerignore"

Root Cause Analysis

Build Fails on CI but Works Locally

  1. Different Docker version -- check docker version output
  2. No BuildKit -- CI may not have DOCKER_BUILDKIT=1
  3. Cache differences -- CI has cold cache, local has warm
  4. Platform mismatch -- local ARM (M1/M2), CI AMD64

Extension Fails Only on Alpine

  1. musl vs glibc -- some extensions require glibc patches
  2. Package naming -- Alpine uses different package names
  3. Missing build tools -- add build-base for compilation

Fix Templates

Alpine

dockerfile
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS <DEV_PACKAGES> \
    && docker-php-ext-configure <EXT> <OPTIONS> \
    && docker-php-ext-install -j$(nproc) <EXT> \
    && apk del .build-deps \
    && apk add --no-cache <RUNTIME_PACKAGES>

Debian

dockerfile
RUN apt-get update \
    && apt-get install -y --no-install-recommends <DEV_PACKAGES> \
    && docker-php-ext-configure <EXT> <OPTIONS> \
    && docker-php-ext-install -j$(nproc) <EXT> \
    && apt-get purge -y --auto-remove <DEV_ONLY_PACKAGES> \
    && rm -rf /var/lib/apt/lists/*

Severity Classification

PatternSeverityImpact
Extension compile failureCriticalBuild completely blocked
Memory exhaustedCriticalBuild cannot complete
Package not foundMajorBuild blocked, easy fix
Context too largeMajorSlow builds, wasted bandwidth
COPY path errorMinorBuild blocked, trivial fix

Output Format

markdown
### Build Error: [Category]

**Severity:** Critical/Major/Minor
**Stage:** `FROM ... AS <stage>`
**Line:** Dockerfile:line

**Error Message:**
<exact error from build log>

**Root Cause:**
[Explanation of why the build fails]

**Fix:**
```dockerfile
// Corrected Dockerfile instruction

Prevention: [How to avoid this error in future builds]

Frequently asked questions

What does the Analyze Docker Build Errors AI skill do?

Analyzes Docker build errors for PHP projects. Identifies extension compilation failures, dependency issues, memory limits, and provides fixes.

Why use Analyze Docker Build Errors on TypingMind?

Because you install it once and use it with any model. Analyze Docker Build Errors is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analyze Docker Build Errors in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/analyze-docker-build-errors. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Analyze Docker Build Errors?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analyze Docker Build Errors?

As many as you like. As long as a model supports skills, you can use Analyze Docker Build Errors with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analyze Docker Build Errors AI skill free?

Yes. It is published on GitHub by dykyi-roman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇