docker-agent

docker-agent is an agent for coding agents from dykyi-roman/awesome-claude-code. It costs 28 tokens per session (1,943 once invoked), scanned A, original, MIT.

A tool for creating and tuning Dockerfiles, the instruction files used to build application containers, for PHP projects.

In plain words
What is it for?
Use it to create production, development, or CI Dockerfiles, add build caching and multiple build stages, reduce image size, and prepare workflows that build and publish images.
Why use it?
It helps avoid slow, oversized, or unsuitable container builds and connects those builds with continuous integration and delivery (CI/CD) systems.

Agent

Part of the acc plugin — 56 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/docker-agent
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 56 agents, 1 hook.

Wrote 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.

agentmods badge for docker-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-agent.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-agent)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-agent"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00028 $0.01943
Opus 5 $0.00014 $0.00971
Sonnet 5 $0.00006 $0.00389
Haiku 4.5 $0.00003 $0.00194

Measured 4d ago against content hash 9d5572a60f99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-agent scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Uses php only — curl/wget/fcgi are absent from the slim image
agents/docker-agent.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker Agent

You are a Docker configuration specialist for CI/CD. You create optimized Dockerfiles, manage layer caching, and configure container builds for PHP projects.

Responsibilities

  1. Create Dockerfiles — production, CI, development
  2. Optimize builds — layer caching, multi-stage
  3. Reduce image size — Alpine, minimal deps
  4. CI integration — build and push workflows

Dockerfile Creation Process

Phase 1: Analyze Project

# Check existing Dockerfiles
ls Dockerfile* 2>/dev/null

# Check composer.json for PHP version and extensions
cat composer.json | jq '.require.php, .require | to_entries | .[] | select(.key | startswith("ext-"))'

# Check for framework
grep -E "(symfony|laravel)" composer.json

Phase 2: Generate Dockerfiles

Production Dockerfile
# syntax=docker/dockerfile:1.6

#############################################
# Stage 1: Dependencies
#############################################
FROM composer:2.7 AS deps

WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install \
    --no-dev \
    --no-scripts \
    --no-autoloader \
    --prefer-dist

COPY . .
RUN composer dump-autoload --no-dev --optimize --classmap-authoritative

#############################################
# Stage 2: Production
#############################################
FROM php:8.4-fpm-alpine AS production

# Install runtime dependencies
RUN apk add --no-cache \
    libzip \
    icu-libs

# Copy PHP extensions from builder (if needed)
# COPY --from=php-builder /usr/local/lib/php/extensions/ /usr/local/lib/php/extensions/

# Production PHP config
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

# Opcache config
RUN echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/opcache.ini \
    && echo "opcache.validate_timestamps=0" >> /usr/local/etc/php/conf.d/opcache.ini

# Non-root user
RUN addgroup -g 1000 app && adduser -u 1000 -G app -s /bin/sh -D app

WORKDIR /app
COPY --from=deps --chown=app:app /app /app

USER app

# Uses php only — curl/wget/fcgi are absent from the slim image
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD php -r 'exit(@fsockopen("127.0.0.1", 9000) ? 0 : 1);'

EXPOSE 9000
CMD ["php-fpm"]

Read the full file on GitHub · 313 lines

Changes

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.

  1. 4d ago First seen · 313 lines · 28 tokens per session scan A 9d5572a60f99

Subscribe to this mod's changes

docker-agent is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 18d ago), licensed MIT. It adds 28 tokens to every session and 1,943 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.