Percona Server 8.4/9.7 LTS built from source with PGO+LTO, hardened, on Wolfi. XtraBackup included.
2.0K
Percona Server for MySQL 8.4 LTS and 9.7 LTS, compiled from source with PGO, hardened, sized to your container, with XtraBackup inside.
Typical MySQL images ship distribution packages on a full Debian userland, start with a 128 MB buffer pool whatever memory you give them, and leave backups to a separate image. This one compiles Percona Server from pinned source on a minimal Wolfi base, tunes InnoDB and the thread pool from the container's limits on every start, and includes XtraBackup at the same version as the server.
percona/percona-server:8.4 and mysql:8.4 with identical settings
(benchmarks).--memory and
--cpus. On disk-bound workloads that is +20 to 200% over the 128 MB default.connection_control against brute force, ECDHE-only TLS generated on
first start. Unused auth plugins, MyRocks, NDB and telemetry are not built.linux/amd64 and linux/arm64, rebuilt weekly.MYSQL_* variables and /docker-entrypoint-initdb.d of the docker-library images;
data directories from dementev/mysql-percona and percona/percona-server start as they are.GitHub · Full documentation · Lotus Web Agency
services:
db:
image: lotuswebagency/mysql-percona:8.4
restart: unless-stopped
mem_limit: 4g # buffer pool and redo log: 2 GB each
cpus: 2 # thread pool size: 2
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root_password
MYSQL_DATABASE: app
MYSQL_USER: app
MYSQL_PASSWORD: change-me
secrets: [mysql_root_password]
volumes:
- mysql-data:/var/lib/mysql
secrets:
mysql_root_password:
file: ./secrets/mysql_root_password # readable by UID 1001
volumes:
mysql-data:
Scripts in /docker-entrypoint-initdb.d (.sh, .sql, compressed .sql) run once on an empty data
directory; scripts in /docker-entrypoint-always.d run on every start.
| Tag | Meaning |
|---|---|
8.4, 9.7 | Series. Follows the newest release of that series. |
8.4.13-13, 9.7.2-3 | Exact Percona Server version, rebuilt weekly. |
latest | The newest series, currently 9.7. |
<tag>-v3 | The same, for x86-64-v3 or Neoverse N2/V2 class arm64 CPUs. |
Pin a series tag for a database, never latest. A newer series upgrades the data directory on
first start, and that cannot be undone. Use the default tags on Apple silicon, Graviton2 or Graviton3.
Variables that carry a value (passwords, names, sizes) also have a _FILE form for Docker secrets, e.g. MYSQL_ROOT_PASSWORD_FILE.
| Variable | Default | Effect |
|---|---|---|
MYSQL_ROOT_PASSWORD | Root password. This, MYSQL_RANDOM_ROOT_PASSWORD or MYSQL_ALLOW_EMPTY_PASSWORD is required on first start | |
MYSQL_ROOT_HOST | % | localhost disables remote root |
MYSQL_DATABASE | Database created on first start | |
MYSQL_USER, MYSQL_PASSWORD | Account with all privileges on MYSQL_DATABASE | |
MYSQL_BACKUP_PASSWORD | Creates the xtrabackup account for backups and CLONE | |
MYSQL_INNODB_BUFFER_POOL_SIZE | 50% of the memory limit | e.g. 2G |
MYSQL_INNODB_REDO_LOG_CAPACITY | buffer pool size, max 8G | e.g. 1G |
MYSQL_THREAD_HANDLING | pool-of-threads | or one-thread-per-connection |
MYSQL_THREAD_POOL_SIZE | the CPU quota | Positive integer |
MYSQL_SERVER_ID, MYSQL_REPORT_HOST | Replication settings | |
MYSQL_READ_ONLY, MYSQL_SUPER_READ_ONLY | ON or OFF |
Without a memory limit InnoDB keeps 128 MB; set MYSQL_INNODB_BUFFER_POOL_SIZE. Your own *.cnf
files go in /etc/mysql/conf.d/. All variables and defaults:
configuration reference.
3306. User mysql, UID and GID 1001. Data in /var/lib/mysql. Built-in healthcheck.utf8mb4, GTID on, strict SQL mode, skip-name-resolve, local_infile off./etc/mysql/ssl/ for
VERIFY_IDENTITY.percona/pmm-client as a sidecar.docker exec db xtrabackup --user=xtrabackup --password=... --backup --target-dir=/backup/full
docker exec db xtrabackup --prepare --target-dir=/backup/full
Incremental, streamed, replica and CLONE recipes: Backups.
docker run -d --name db \
--read-only --cap-drop ALL --security-opt no-new-privileges \
--tmpfs /tmp:mode=1777 \
--tmpfs /var/run/mysqld:uid=1001,gid=1001,mode=0750 \
--tmpfs /etc/mysql/env.d:uid=1001,gid=1001,mode=0750 \
--tmpfs /etc/mysql/ssl:uid=1001,gid=1001,mode=0750 \
--tmpfs /var/log/mysql:uid=1001,gid=1001,mode=0750 \
--tmpfs /tmp-replica:uid=1001,gid=1001,mode=0750 \
-e MYSQL_ROOT_PASSWORD=change-me -e MYSQL_ROOT_HOST=localhost \
-v mysql-data:/var/lib/mysql \
lotuswebagency/mysql-percona:8.4
Measured in December 2026 with sysbench 1.0.20 on an idle Xeon E-2286G (6 cores): the server on 3 cores, sysbench on the other 3, 8 tables of 100,000 rows, data on tmpfs, 60 s per measurement, median of 3 rounds in rotated order.
Same settings for all three (1 GB buffer pool, 1 GB redo log, one thread per connection,
binary log and GTID on; checked by diffing SHOW GLOBAL VARIABLES). Transactions per second at 16
threads:
| Workload | lotuswebagency/mysql-percona:8.4 | percona/percona-server:8.4 | mysql:8.4 |
|---|---|---|---|
| oltp_point_select | 152,411 | 132,088 (ours +15%) | 133,961 (ours +14%) |
| oltp_read_only | 5,630 | 4,934 (ours +14%) | 4,970 (ours +13%) |
| oltp_read_write | 3,492 | 3,069 (ours +14%) | 3,098 (ours +13%) |
| oltp_write_only | 12,230 | 10,916 (ours +12%) | 11,122 (ours +10%) |
Across 1, 16 and 64 threads ours was 7 to 18% faster than both, with equal or lower p95 latency (up to 14% lower). Versions: ours 8.4.11-12, Percona 8.4.13-13, MySQL 8.4.13.
Each image's own defaults in a --memory 4g --cpus 4 container, data on disk, a 1 GB dataset:
ours served about twice the point-select throughput and 16 to 27% more read-write transactions.
That gain comes mostly from sizing: ours gives InnoDB 2 GB and a thread pool, the others keep a
128 MB buffer pool.
cosign verify lotuswebagency/mysql-percona:8.4 \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity 'https://github.com/LotusWebAgency/mysql-percona/.github/workflows/ci.yml@refs/heads/main'
dementev/mysql-percona: same UID, paths and variables
(what changes).percona/percona-server:
socket, config and telemetry notes.mysql_native_password.| Image | What it does |
|---|---|
dementev/angie — source | Public-facing reverse proxy and TLS terminator — Angie, the nginx fork, with brotli, zstd and cache-purge |
dementev/nginx — source | Static sites and SPAs behind that proxy — brotli/zstd siblings, Prometheus stub_status |
lotuswebagency/php — source | PHP 7.0 → 8.5 compiled from source on Wolfi, hardened and signed — successor to the deprecated dementev/php-fpm-with-ext |
lotuswebagency/nginx-nodejs — source | Rootless Node.js runtime behind Nginx, with sanitized logs and optional Loki delivery |
lotuswebagency/mysql-percona — this image | Percona Server for MySQL 8.4 and 9.7 LTS with XtraBackup, compiled from source with PGO and hardened — the from-source successor to dementev/mysql-percona |
dementev/mysql-percona — source | Percona Server for MySQL 8.4 LTS, XtraBackup built in, no root inside |
dementev/adminer — source | Adminer 6 with every driver it supports, for reaching any of the above |
Built and maintained by Vasilii Dementev at Lotus Web Agency. All our open-source work: lotuswebagency.com/open-source.
Issues and pull requests: GitHub. Security reports:
SECURITY.md. Packaging is
MIT licensed; Percona Server and XtraBackup are GPL-2.0, with license texts in
/usr/share/licenses/ and source details in
NOTICE.
docker pull lotuswebagency/mysql-percona:latest