|
Pinba Engine 2.11.3
MySQL Storage Engine for PHP Performance Statistics
|
This guide explains how to run the published Pinba Engine images in production, how tags and digests behave, and how to build, validate, and publish the images yourself.
Pre-built images are published to Docker Hub:
| Database | Tag | Architectures |
|---|---|---|
| MySQL 8.0 | xolegator/pinba-engine:8.0 | linux/amd64 |
| MySQL 8.4 LTS | xolegator/pinba-engine:8.4 | linux/amd64, linux/arm64 |
| MariaDB 10.11 LTS | xolegator/pinba-engine:mariadb-10.11 | linux/amd64, linux/arm64 |
| MariaDB 11.8 LTS | xolegator/pinba-engine:mariadb-11.8 | linux/amd64, linux/arm64 |
xolegator/pinba-engine:latest is an alias for the MySQL 8.4 LTS channel.
Each channel also gets a version-suffixed tag per Pinba release, e.g. xolegator/pinba-engine:8.4-v2.11.3 — but see Tag stability and digest pinning before using it as an immutable reference.
The MySQL 8.0 channel is amd64-only because the upstream mysql:8.0 Debian (-bookworm) base image is not published for arm64.
The images extend the official mysql / mariadb images, so all upstream configuration mechanisms (environment variables, /etc/mysql/conf.d, /docker-entrypoint-initdb.d) work unchanged.
Always mount a named volume at /var/lib/mysql. The base images declare an anonymous volume there: without an explicit mount your data silently lands in an anonymous volume that is orphaned by docker rm, and every container recreation starts from scratch. A named volume preserves user accounts and grants, the Pinba plugin registration (mysql.plugin), and any regular tables you create (e.g. report snapshots aggregated from Pinba data).
Note that Pinba's own stats tables live in memory by design — metrics are rebuilt from incoming UDP traffic and rotated after pinba_stats_history seconds — so the volume does not (and cannot) preserve Pinba metrics across restarts. The volume is for everything else that makes the instance yours.
Minimal docker run:
Equivalent Docker Compose service with a healthcheck:
For the MariaDB images use MARIADB_ROOT_PASSWORD and the built-in healthcheck script instead:
Things to know for long-term operation:
pinba schema are created by /docker-entrypoint-initdb.d scripts, which the official entrypoint runs only when the data directory is empty. With a persistent volume this happens exactly once; later image upgrades reuse the plugin registration stored in the data directory (the plugin binary itself always comes from the image).8.4). The MySQL/MariaDB data-directory upgrade rules of the upstream images apply unchanged.30002/udp inside the container. Publish the port (as above) or attach the container to the network your PHP/pinba clients use.All published tags are mutable, including the version-suffixed ones:
8.0, 8.4, mariadb-10.11, mariadb-11.8, latest) move with every Pinba release.8.4-v2.11.3) are re-pushed when the base MySQL/MariaDB image gets a patch update: an automated workflow bumps the base image and rebuilds, so the same tag can start pointing to a different image between Pinba releases.For reproducible production deployments pin by digest:
Current digests, updated automatically by CI on every image rebuild:
| Channel | Digest |
|---|---|
8.0 | sha256:f1af3b856c72f2cd06c31a7f9bd1414c42c56c5c5e26050232df8f1af83d085c |
8.4 | sha256:29d1f4fa39bc1d22683e9d2ee502138d04bc438a45adc63d73484b0095b9cfe8 |
mariadb-10.11 | sha256:98a08d9085e870e57b24f5386e54082e9b16d0c8d7759b944aef7e9dd60a814e |
mariadb-11.8 | sha256:e9dbcec3d587350bafcdb03f54a69aefd4132186c2a157633806d2698d2d915f |
To resolve a digest yourself:
From the repository root. Use separate Dockerfiles to keep the channels isolated:
Multi-arch build (amd64 + arm64; not supported for Dockerfile.mysql80, see section 1):
Optional version-specific tag:
Validate plugin status:
Validate Pinba schema:
Clean up test container:
Publishing to Docker Hub is automated by .github/workflows/docker.yml (runs on release, on pushes touching the Docker inputs, and on manual dispatch). Manual publishing, if ever needed:
docker logs pinba-mysql-test..If plugin is not active, verify SQL init scripts in/docker-entrypoint-initdb.d` and remember they only run when the data directory is empty (first start of a fresh volume).