Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/pekral/cursor-rulesnpx agentmods add skills/pekral/cursor-rules/docker-patternsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pekral/cursor-rules/docker-patterns)<a href="https://agentmods.dev/skills/pekral/cursor-rules/docker-patterns"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/docker-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pekral/cursor-rules/docker-patterns"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/docker-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00055 | $0.02115 |
| Opus 5.5 | $0.00022 | $0.00846 |
| Sonnet 5.5 | $0.00011 | $0.00423 |
| Haiku 4.5 | $0.00006 | $0.00212 |
Grade A, and why
docker-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docker Patterns
Constraints
- Apply
@rules/security/backend.md— never bake secrets into image layers, inject them at runtime; apply least privilege (non-root user, dropped capabilities, least-privileged DB user). - Apply
@rules/laravel/laravel.mdc— respect Laravel's directory layout, artisan commands, and config caching. - Pin every base image to a specific tag (never
:latest) for reproducible builds. - One process per container: PHP-FPM, queue worker, and scheduler are separate containers sharing the same image.
.envand secrets stay out of images and out of git.
Use when
- Writing or reviewing a
Dockerfile/docker-compose.ymlfor a Laravel app. - Setting up local dev (nginx + PHP-FPM + MySQL + Redis) or a build pipeline for a production image.
- Reviewing image size, layer caching, healthchecks, or secret handling.
Multi-Stage Dockerfile (PHP-FPM)
Separate Composer deps, the Vite/asset build, and the lean runtime so each layer caches independently and dev tooling never ships to production.
# syntax=docker/dockerfile:1
# --- Stage: composer deps (cached unless composer.* change) ---
FROM composer:2 AS vendor
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-dev --no-scripts --prefer-dist \
--optimize-autoloader --no-interaction
# --- Stage: node/vite asset build ---
FROM node:22-alpine AS assets
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY vite.config.js ./
COPY resources ./resources
RUN npm run build # emits public/build via laravel-vite-plugin
# --- Stage: runtime (php-fpm, non-root, opcache) ---
FROM php:8.3-fpm-alpine AS runtime
RUN apk add --no-cache fcgi \
&& docker-php-ext-install pdo_mysql opcache bcmath pcntl \
&& addgroup -g 1000 -S app && adduser -S app -u 1000 -G app
COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
WORKDIR /var/www/html
COPY --chown=app:app . .
COPY --from=vendor --chown=app:app /app/vendor ./vendor
COPY --from=assets --chown=app:app /app/public/build ./public/build
USER app
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s \
CMD php-fpm-healthcheck || exit 1
EXPOSE 9000
CMD ["php-fpm"]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 205 lines · 55 tokens per session scan A 7fb50234affe
docker-patterns is a skill published in the GitHub repository pekral/cursor-rules (11 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 2,115 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
docker-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| docker-patternspekral/cursor-rules | Skill | 11 | yesterday | MIT | A | 55 | Claude Code, Codex |
| github-actions-templateswshobson/agents | Skill | 43k | yesterday | MIT | A | 44 | Claude Code |
| create-powergrid-pluginPower-Components/livewire-powergrid | Skill | 1.7k | 2d ago | MIT | A | 31 | Claude Code, Codex |
| laravelericrisco/rsc-harness | Skill | 691 | 5d ago | MIT | A | 75 | Claude Code, Codex |
| owl-admin-app-devslowlyo/owl-admin | Skill | 621 | 16d ago | MIT | A | 114 | Claude Code, Codex |
| owl-admin-amis-pageslowlyo/owl-admin | Skill | 621 | 16d ago | MIT | A | 84 | Claude Code, Codex |
| owl-admin-frontend-assetsslowlyo/owl-admin | Skill | 621 | 16d ago | MIT | A | 80 | Claude Code, Codex |