Sign inSign up

epicmorg/mariadb

By epicmorg

•Updated 2 days ago

MariaDB 5.5-13.0 (project binaries), drop-in for library/mariadb and bitnami/mariadb

Image
0

1.2K

epicmorg/mariadb repository overview

⁠epicmorg/mariadb

MariaDB from the project's bintar tarballs (archive.mariadb.org, GPG signature checked with the MariaDB signing keys) on Debian 13 trixie, one tag per release line at its newest patch: the supported LTS lines 10.11, 11.4, 11.8, 12.3, the rolling stable 13.0, and the ended series 5.5, 10.0 - 10.6 for data that has to be read or migrated. The entrypoint is a drop-in for library/mariadb (MARIADB_* with the MYSQL_* aliases, /var/lib/mysql, /etc/mysql/conf.d, /docker-entrypoint-initdb.d, uid 999) and understands the bitnami/mariadb variables too (MARIADB_ROOT_USER, ALLOW_EMPTY_PASSWORD, character set, replication, /bitnami/mariadb, my_custom.cnf). MariaDB itself is not built from source; what is ours: the base, the libraries trixie lacks, the entrypoint and the fatal checks.

⁠What's inside

LineTagsUpstream
13.013, latestrolling stable
12.312, ltsLTS
11.811LTS
11.4LTS
10.1110LTS
10.6, 10.5, 10.4, 10.3, 10.2, 10.1, 10.0ended
5.55ended
  • MariaDB in /usr/local/share/epicmorg/mariadb/<line> (also /usr/local/mariadb, /usr/local/mysql), on PATH; glibc_214 builds up to 10.4, systemd builds from 10.5; TLS is linked into the server statically;
  • baked here: libaio 0.3.113 (trixie only has libaio.so.1t64) and ncurses 6.6 built with ABI 5 (libncurses.so.5 / libtinfo.so.5) for the clients up to 10.5, wired into the vendor ELF files with patchelf --force-rpath - nothing in ld.so.conf; Debian's libcrack2 / libodbc2 / Judy for the cracklib / CONNECT / OQGraph plugins;
  • Galera is not included (its provider and garbd link OpenSSL 1.1 / Boost 1.66 - a second OpenSSL next to the server's own); the test suite, debug / embedded binaries and static libraries are removed too;
  • /emg-export - MariaDB + those libraries for COPY --from;
  • entrypoint under tini; the server runs as mysql (uid 999) when the container starts as root; volume /var/lib/mysql, port 3306; HEALTHCHECK = mariadb-admin ping.

Fatal build-time checks: server and client versions, no unresolved libraries anywhere in bin/ / lib/, at most one libssl per ELF, the server uses the baked libaio, and a smoke test - first start with root / database / user, time zone tables, no anonymous accounts, a TLS session (11.4+, zero-configuration TLS), runs as mysql, restart on the persisted datadir, the bitnami variables (MARIADB_ROOT_USER, character set and collation), refusal to initialise without a password option.

⁠Variables

Every MARIADB_* name below also works as MYSQL_* (MARIADB_* wins). Read on the first start (empty datadir) unless noted.

VariableMeaning
MARIADB_ROOT_PASSWORD (_FILE)root password (root@localhost and root@MARIADB_ROOT_HOST)
MARIADB_ROOT_HOSThost of the second root account (default %; localhost = none)
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD / ALLOW_EMPTY_PASSWORDallow an empty root password
MARIADB_RANDOM_ROOT_PASSWORDgenerate one (printed to the log)
MARIADB_DATABASE / MARIADB_USER / MARIADB_PASSWORD (_FILE)database, and a user with all privileges on it
MARIADB_INITDB_SKIP_TZINFOdo not load the time zone tables
MARIADB_AUTO_UPGRADEevery start: 0 = do not upgrade the system tables of older data (default: upgrade, after a dump of the mysql schema to system_mysql_backup_<old>.sql.zst in the datadir)
MARIADB_ROOT_USERbitnami: an extra <user>@% with all privileges and the root password
MARIADB_CHARACTER_SET / MARIADB_COLLATEbitnami: --character-set-server / --collation-server, also for MARIADB_DATABASE
MARIADB_PORT_NUMBER / MARIADB_BIND_ADDRESS / MARIADB_SQL_MODEbitnami: --port / --bind-address / --sql-mode (every start)
MARIADB_ENABLE_SLOW_QUERY / MARIADB_LONG_QUERY_TIMEbitnami: slow query log (every start)
MARIADB_EXTRA_FLAGSbitnami: extra server flags (every start)
MARIADB_REPLICATION_MODEbitnami: master / slave - server id, binlog, relay log, read-only
MARIADB_REPLICATION_USER / _PASSWORDmaster: the replication account; slave: the account to replicate with
MARIADB_MASTER_HOST / _PORT_NUMBER / _ROOT_USER / _ROOT_PASSWORD / _DELAYslave: the source

/docker-entrypoint-initdb.d/*.sh (sourced, or run when executable) and *.sql, *.sql.gz, *.sql.bz2, *.sql.xz, *.sql.zst run once, against MARIADB_DATABASE when set. Arguments starting with - go to the server; any other command (mariadb, mariadb-dump, bash) runs as is. A mounted /bitnami/mariadb becomes --datadir=/bitnami/mariadb/data; /opt/bitnami/mariadb/conf/my_custom.cnf is included via /etc/mysql/conf.d.

⁠Tags

TagsDockerfile
5.5, 5.5.68, 55.5⁠
10.0, 10.0.3810.0⁠
10.1, 10.1.4810.1⁠
10.2, 10.2.4410.2⁠
10.3, 10.3.3910.3⁠
10.4, 10.4.3410.4⁠
10.5, 10.5.2910.5⁠
10.6, 10.6.2810.6⁠
10.11, 10.11.19, 1010.11⁠
11.4, 11.4.1311.4⁠
11.8, 11.8.9, 1111.8⁠
12.3, 12.3.3, 12, lts12.3⁠
13.0, 13.0.2, 13, latest13.0⁠

Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/mariadb:<tag> on each) - same digest everywhere.

⁠Usage

services:
  mariadb:
    image: epicmorg/mariadb:11.8          # was: mariadb:11.8 - environment and volume unchanged
    restart: always
    environment:
      MARIADB_ROOT_PASSWORD_FILE: /run/secrets/mariadb-root
      MARIADB_DATABASE: app
      MARIADB_USER: app
      MARIADB_PASSWORD_FILE: /run/secrets/mariadb-app
    volumes:
      - ./mariadb:/var/lib/mysql
    secrets: [mariadb-root, mariadb-app]
secrets:
  mariadb-root:
    file: ./mariadb-root.txt
  mariadb-app:
    file: ./mariadb-app.txt

⁠Notes

  • Upgrade a datadir one major series at a time (5.5 -> 10.0 -> ... -> 10.6 -> 10.11 -> 11.4 ...); the image upgrades the system tables itself (see MARIADB_AUTO_UPGRADE).
  • Licences: MariaDB Server is GPLv2; the image recipe is MIT.

Folders are written by bin/python/mariadb-versions-sync.py.

Tag summary

Content type

Image

Digest

sha256:cb8f82c9f…

Size

1.7 GB

Last updated

2 days ago

docker pull epicmorg/mariadb