# docker-library/php architecture

> Architecture diagram of the GitHub repository docker-library/php, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/docker-library/php
- Repository: https://github.com/docker-library/php

## Overview

This repository maintains the Docker Official Image for PHP. Its tree contains Dockerfile variants across PHP versions, Debian/Alpine bases, and CLI, FPM, Apache, and ZTS configurations, plus shared PHP container helper scripts. The README establishes the repository’s role as image source, but no source excerpts or detailed runtime workflow documentation were provided; internal connections are therefore not asserted.

Main entry points: [`8.4/bookworm/fpm/Dockerfile`](https://github.com/docker-library/php/blob/master/8.4/bookworm/fpm/Dockerfile) (Official PHP image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_images["PHP images"]
  node_official["Official PHP image<br/>[Dockerfile]"]
  node_variants["Image variants<br/>[8.4]"]
end

subgraph group_helpers["Container helpers"]
  node_entrypoint["PHP entrypoint"]
  node_extensions["Extension tools"]
  node_sourcehelper["PHP source tool"]
end

node_maintainer(("Image maintainers"))
node_hub(("Docker Hub"))

node_maintainer -->|"maintains source"| node_official
node_official -->|"image description"| node_hub

click node_official "https://github.com/docker-library/php/blob/master/8.4/bookworm/fpm/Dockerfile"
click node_variants "https://github.com/docker-library/php/tree/master/8.4"
click node_entrypoint "https://github.com/docker-library/php/blob/master/docker-php-entrypoint"
click node_extensions "https://github.com/docker-library/php/blob/master/docker-php-ext-install"
click node_sourcehelper "https://github.com/docker-library/php/blob/master/docker-php-source"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_official,node_variants toneBlue
class node_entrypoint,node_extensions,node_sourcehelper toneAmber
class node_maintainer,node_hub toneIndigo
```

## Components

### PHP images

- [Official PHP image](https://github.com/docker-library/php/blob/master/8.4/bookworm/fpm/Dockerfile): `8.4/bookworm/fpm/Dockerfile`
- [Image variants](https://github.com/docker-library/php/tree/master/8.4): `8.4`

### Container helpers

- [PHP entrypoint](https://github.com/docker-library/php/blob/master/docker-php-entrypoint): `docker-php-entrypoint`
- [Extension tools](https://github.com/docker-library/php/blob/master/docker-php-ext-install): `docker-php-ext-install`
- [PHP source tool](https://github.com/docker-library/php/blob/master/docker-php-source): `docker-php-source`

### Other components

- **Image maintainers**
- **Docker Hub**

## Connections

- Image maintainers → Official PHP image: maintains source (evidence: `README.md`)
- Official PHP image → Docker Hub: image description (evidence: `README.md`)
