/acc:analyze-docker-build-errorsfrom acc
Analyzes Docker build errors for PHP projects, identifying extension compilation failures, missing dependencies, memory limits, and oversized build contexts with targeted fixes.
Ships in acc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze Dockerfile and build logs for PHP project build failures and provide targeted fixes.
| Error Category | Symptom | Root Cause |
|---|---|---|
| Extension compilation | configure: error: ... | Missing dev packages |
| Package not found | E: Unable to locate package | Wrong package name for base image |
| Permission denied | COPY failed: permission denied | File ownership or Docker socket |
| Memory exhausted | Allowed memory size exhausted | Composer or PHP memory limit |
| Context too large | sending build context... 2GB | Missing .dockerignore |
| Multi-stage failure | COPY --from=builder ... not found | Wrong stage name or path |
# 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
| Extension | Alpine Packages | Debian Packages |
|---|---|---|
| gd | libpng-dev libjpeg-turbo-dev freetype-dev | libpng-dev libjpeg62-turbo-dev libfreetype6-dev |
| intl | icu-dev | libicu-dev |
| zip | libzip-dev | libzip-dev |
| pdo_pgsql | postgresql-dev | libpq-dev |
| soap | libxml2-dev | libxml2-dev |
| xsl | libxslt-dev | libxslt1-dev |
| imagick | imagemagick-dev (PECL) | libmagickwand-dev (PECL) |
# 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
# Required .dockerignore entries
.git
node_modules
vendor
var/cache
var/log
docker-compose*.yml
.env.local
tests
docs
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
# 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"
docker version outputDOCKER_BUILDKIT=1build-base for compilationRUN 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>
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/*
| Pattern | Severity | Impact |
|---|---|---|
| Extension compile failure | Critical | Build completely blocked |
| Memory exhausted | Critical | Build cannot complete |
| Package not found | Major | Build blocked, easy fix |
| Context too large | Major | Slow builds, wasted bandwidth |
| COPY path error | Minor | Build blocked, trivial fix |
### 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]
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin acc283 skills in this plugin
/access-control-knowledgeAccess Control knowledge base. Provides ACL, RBAC, ABAC, ReBAC models, multi-tenancy patterns, and PHP implementations (Symfony Voters, Laravel Gates) for security audits and generation./adr-knowledgeAction-Domain-Responder pattern knowledge base. Provides patterns, antipatterns, and PHP-specific guidelines for ADR (web-specific MVC alternative) audits./adr-templateGenerates Architecture Decision Records (ADR) for PHP projects. Creates structured decision documentation with context, decision, and consequences./analyze-ci-configAnalyzes existing CI/CD configurations. Detects issues in GitHub Actions and GitLab CI files, checks for best practices, caching efficiency, and security concerns./analyze-ci-logsAnalyzes CI/CD pipeline logs to identify failure causes. Parses error messages, detects common failure patterns, and provides fix recommendations./analyze-coupling-cohesionAnalyzes coupling and cohesion metrics in PHP codebases. Calculates Afferent/Efferent coupling (Ca/Ce), LCOM metrics, instability index, and abstractness. Identifies highly coupled modules and low cohesion classes.Other plugins' skills for the same job