A Docker container for running MariaDB Galera Cluster on Ubuntu 24.04 base image, providing a highly available and scalable database solution.
- Based on Ubuntu 24.04 (Noble)
- MariaDB 11.4 LTS with Galera Cluster
- Automated health monitoring
- Optimized for container environments
- Configurable through environment variables
- Built-in backup support with mariadb-backup
# Pull the image
docker pull peterweissdk/mariadb-galera:latest
# Start the first node
docker run -d \
--name galera-node1 \
-e MYSQL_ROOT_PASSWORD=your_password \
-e GALERA_CLUSTER_NAME=my_cluster \
-e GALERA_NODE_ADDRESS=node1_ip \
peterweissdk/mariadb-galera:latest
# Join additional nodes
docker run -d \
--name galera-node2 \
-e MYSQL_ROOT_PASSWORD=your_password \
-e GALERA_CLUSTER_NAME=my_cluster \
-e GALERA_NODE_ADDRESS=node2_ip \
-e GALERA_CLUSTER_ADDRESS=gcomm://node1_ip \
peterweissdk/mariadb-galera:latest
MYSQL_ROOT_PASSWORD
: Root password for MariaDBGALERA_CLUSTER_NAME
: Name of the Galera clusterGALERA_NODE_ADDRESS
: IP address of this nodeGALERA_CLUSTER_ADDRESS
: Cluster connection address (gcomm://)MYSQL_DATABASE
: Create this database on startupMYSQL_USER
: Create this user on startupMYSQL_PASSWORD
: Password for MYSQL_USER
- 3306: MariaDB
- 4444: SST (State Snapshot Transfer)
- 4567: Galera Cluster
- 4568: IST (Incremental State Transfer)
# Clone the repository
git clone https://github.com/peterweissdk/mariadb-galera.git
# Build the image
cd mariadb-galera
docker build -t mariadb-galera .
.
├── conf
│ ├── galera
│ │ └── galera.cnf
│ └── sources.list
│ └── mariadb.sources
├── docker-entrypoint.sh
├── Dockerfile
├── healthcheck.sh
├── LICENSE
└── README.md
The container includes a comprehensive health monitoring system that checks:
- MariaDB service availability
- Galera provider status (wsrep_ready)
- Cluster size and connectivity
- Node synchronization state
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or need support, please file an issue on the GitHub repository.
This project is licensed under the GNU GENERAL PUBLIC LICENSE v3.0 - see the LICENSE file for details.