Sign inSign up

devsaurus/mariadb-galera

By devsaurus

•Updated 16 days ago

Official MariaDB image with Galera cluster automation. Easy multi-node setup with auto-bootstrap.

Image
Databases & storage
0

4.3K

devsaurus/mariadb-galera repository overview

⁠MariaDB Galera Cluster

Official MariaDB image with Galera cluster automation scripts by Devsaurus.

⁠Features

  • ✅ Based on official mariadb image
  • ✅ Automatic Galera cluster configuration
  • ✅ Smart bootstrap detection
  • ✅ SST user auto-creation
  • ✅ Cluster health checks
  • ✅ Multi-arch: amd64, arm64

⁠Quick Start

⁠Single Node
docker run -d --name galera \
  -e MARIADB_ROOT_PASSWORD=secret \
  -e GALERA_CLUSTER_BOOTSTRAP=yes \
  devsaurus/mariadb-galera:11.4
⁠3-Node Cluster
# Node 1 (bootstrap)
docker run -d --name galera-1 \
  -e MARIADB_ROOT_PASSWORD=secret \
  -e GALERA_CLUSTER_NAME=mycluster \
  -e GALERA_CLUSTER_ADDRESS=galera-1,galera-2,galera-3 \
  -e GALERA_CLUSTER_BOOTSTRAP=yes \
  -e GALERA_SST_PASSWORD=sstpass \
  devsaurus/mariadb-galera:11.4

# Node 2, 3 (join)
docker run -d --name galera-2 \
  -e MARIADB_ROOT_PASSWORD=secret \
  -e GALERA_CLUSTER_NAME=mycluster \
  -e GALERA_CLUSTER_ADDRESS=galera-1,galera-2,galera-3 \
  -e GALERA_SST_PASSWORD=sstpass \
  devsaurus/mariadb-galera:11.4

⁠Environment Variables

⁠MariaDB (Official)
VariableDescription
MARIADB_ROOT_PASSWORDRoot password (required)
MARIADB_DATABASECreate database on startup
MARIADB_USERCreate user on startup
MARIADB_PASSWORDPassword for user
⁠Galera (devsaurus)
VariableDefaultDescription
GALERA_CLUSTER_NAMEgalera_clusterCluster name
GALERA_CLUSTER_ADDRESS-Node list (comma-separated)
GALERA_CLUSTER_BOOTSTRAPnoBootstrap new cluster
GALERA_NODE_NAMEhostnameThis node's name
GALERA_SST_METHODmariabackupSST method
GALERA_SST_USERmariabackupSST user
GALERA_SST_PASSWORD-SST password
GALERA_FORCE_BOOTSTRAPnoForce bootstrap (recovery)

⁠Ports

PortDescription
3306MySQL client
4567Galera replication
4568IST
4444SST

⁠Volumes

PathDescription
/var/lib/mysqlDatabase data
/docker-entrypoint-initdb.dInit scripts

⁠Bootstrap Logic

Auto-detects when to bootstrap:

  1. GALERA_CLUSTER_BOOTSTRAP=yes → Bootstrap
  2. No data + no other nodes → Bootstrap
  3. safe_to_bootstrap: 1 + no other nodes → Bootstrap
  4. Otherwise → Join cluster

⁠Tags

TagMariaDB Version
11.4, latest11.4.x
11.211.2.x
10.1110.11.x (LTS)
10.610.6.x (LTS)

⁠License

  • Scripts: MIT
  • MariaDB: GPLv2

Tag summary

Content type

Image

Digest

sha256:7f5816b8d…

Size

114.7 MB

Last updated

16 days ago

docker pull devsaurus/mariadb-galera