Help us improve
Share bugs, ideas, or general feedback.
From acc
Provides Docker patterns, best practices, and checklists for PHP projects including Dockerfile multi-stage builds, docker-compose orchestration, security hardening, and production readiness.
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin accHow this skill is triggered — by the user, by Claude, or both
Slash command
/acc:docker-knowledgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quick reference for Docker patterns and PHP-specific guidelines.
Provides Dockerfile best practices, multi-stage builds for Go/Rust/Node/Python/Java, layer caching, security patterns, and Docker Compose for efficient containers.
Provides Docker best practices for base image selection, Dockerfile layer optimization, multi-stage builds, and production container deployments.
Provides Docker Compose configurations and best practices for PHP stacks including Nginx, PHP-FPM, Redis, PostgreSQL, RabbitMQ, Elasticsearch, health checks, networking, and env management.
Share bugs, ideas, or general feedback.
Quick reference for Docker patterns and PHP-specific guidelines.
┌─────────────────────────────────────────────────────────────────┐
│ DOCKER FOR PHP │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Dockerfile → Build image instructions │
│ docker-compose.yml → Multi-container orchestration │
│ .dockerignore → Build context exclusions │
│ entrypoint.sh → Container startup logic │
│ nginx.conf → Reverse proxy for PHP-FPM │
│ php.ini → PHP runtime configuration │
│ supervisord.conf → Process management │
│ │
│ Multi-Stage Build: │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ composer │ │ php-ext │ │production│ │
│ │ deps │──│ builder │──│ final │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
| Image | Use Case | Size |
|---|---|---|
php:8.4-fpm-alpine | Production (FPM) | ~50MB |
php:8.4-cli-alpine | CI/workers | ~45MB |
php:8.4-fpm | Production (Debian) | ~150MB |
php:8.4-cli | CI/workers (Debian) | ~140MB |
php:8.4-apache | Simple deployments | ~160MB |
latest).dockerignore presentphp.ini-production).env filedepends_on + conditionUSER app)| Violation | Where | Severity |
|---|---|---|
FROM php:latest | Dockerfile | High |
COPY . . before deps install | Dockerfile | High |
| Running as root | Dockerfile | High |
| Secrets in ENV/ARG | Dockerfile | Critical |
| No health check | Dockerfile/Compose | Medium |
No .dockerignore | Project root | Medium |
privileged: true | docker-compose.yml | Critical |
| Hardcoded passwords | docker-compose.yml | Critical |
| No resource limits | docker-compose.yml | Medium |
Missing depends_on conditions | docker-compose.yml | Medium |
# Alpine: use apk + docker-php-ext-install
RUN apk add --no-cache libzip-dev icu-dev \
&& docker-php-ext-install zip intl pdo_mysql opcache
# Debian: use apt-get + docker-php-ext-install
RUN apt-get update && apt-get install -y \
libzip-dev libicu-dev \
&& docker-php-ext-install zip intl pdo_mysql opcache \
&& rm -rf /var/lib/apt/lists/*
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0
opcache.jit=1255
opcache.jit_buffer_size=256M
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 1000
For detailed information, load these reference files:
references/image-selection.md — Base image comparison and selection guidereferences/multistage-patterns.md — Multi-stage build patterns for PHPreferences/security-hardening.md — Security best practices and hardeningreferences/compose-patterns.md — Docker Compose patterns for PHP stacksreferences/production-checklist.md — Production readiness checklist