update-php-images

A command for updating dependencies and development tools in three Specsnl PHP Dockerfile variants: FPM, Apache, and FrankenPHP.

In plain words
What is it for?
Use it to safely prepare coordinated dependency updates on the main branch, using a clean working tree and isolated commits.
Why use it?
It prevents shared versions from being updated in only one Dockerfile and stops when repository or update checks fail.

Command

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 commands/specsnl/agent-specs/update-php-images
Clone the repo
git clone --depth 1 https://github.com/specsnl/agent-specs
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00022 $0.02349
Opus 5 $0.00011 $0.01175
Sonnet 5 $0.00004 $0.00470
Haiku 4.5 $0.00002 $0.00235

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

Security

Grade A, and why

update-php-images 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 2d 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.

plugins/docker/commands/update-php-images.md · 213 lines

How it starts

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

Goal

Perform a full dependency update across all three Dockerfile variants (fpm, apache, frankenphp) in a safe, reproducible way.

Critical rule: Any version that appears in more than one Dockerfile must be updated across all affected Dockerfiles in a single commit. Never update a shared version in only one Dockerfile.

If any step fails, STOP immediately and report the error.

Phase 1 --- Repository Safety Checks

  1. Verify the current branch is main. If not, abort and instruct the user to switch to main first.
  2. Ensure the working (git) tree is clean:
    • No staged changes
    • No unstaged changes
    • No untracked files
    • If not clean: Abort immediately — inform the user to commit or stash changes.
  3. Synchronize with remote: git fetch --prune
  4. Prepare branch updates:
    • If branch does not exist → create from origin/main
    • If branch exists:
      • If fully merged into main → delete locally and recreate from origin/main.
      • If behind main and has NO unique commits → reset updates to origin/main.
      • If it contains unique commits → abort and notify user.
  5. Check if the branch does not already exist on the remote. If it does, abort and inform the user to delete the remote branch first.

Always branch from latest origin/main.

Phase 2 --- PHP Base Image Updates

The three Dockerfiles use different base images but all track the same PHP 8.5.x patch series:

  • fpm/Dockerfile: FROM php:<version>-fpm-trixie
  • apache/Dockerfile: FROM php:<version>-apache-trixie
  • frankenphp/Dockerfile: FROM dunglas/frankenphp:<frankenphp-version>-php<php-version>-trixie
  1. Check Docker Hub for the latest php:8.5.x-fpm-trixie tag. Only consider patch updates within the 8.5.x series — do not update to a different minor or major PHP version.
  2. Check Docker Hub for the latest dunglas/frankenphp tag that matches the pattern x.x.x-php8.5.x-trixie. Only consider updates that keep the PHP 8.5.x series.
  3. Update the FROM lines in all three Dockerfiles if newer versions are available.
  4. Check git status. Commit all three Dockerfiles together in a single commit if there are any changes. Commit message: chore(deps): Update PHP base image versions.
  5. If there are no changes, skip the commit and move on.

Read the full file on GitHub · 213 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. 2d ago First seen · 213 lines · 22 tokens per session scan A 77b49754d398

Subscribe to this mod's changes

update-php-images is a command published in the GitHub repository specsnl/agent-specs (2 stars, last pushed 16d ago), licensed MIT. It adds 22 tokens to every session and 2,349 once invoked, about $0.0001 per session on Opus 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.