mariadb

11.8.9-r0-ls237

mariadb is one of the most popular database servers. Made by the original developers of MySQL.

docker pull lscr.io/linuxserver/mariadb:latest

Quick start

Generated from the image's own configuration. Replace the /path/to folders with real paths on your host.

---
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
      - MYSQL_DATABASE=USER_DB_NAME # optional
      - MYSQL_USER=MYSQL_USER # optional
      - MYSQL_PASSWORD=DATABASE_PASSWORD # optional
      - REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sql # optional
      - CLI_OPTS= # optional
    volumes:
      - /path/to/mariadb/config:/config
    ports:
      - 3306:3306
    restart: unless-stopped

Parameters

Ports
PortFunctionRequired
3306:3306MariaDB listens on this port.required
Environment variables
VariableFunctionRequired
PUID=1000User IDrequired
PGID=1000Group IDrequired
TZ=Etc/UTCTimezonerequired
MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORDSet this to root password for installation (minimum 4 characters & non-alphanumeric passwords must be properly escaped). (valid only for first run)required
MYSQL_DATABASE=USER_DB_NAMESpecify the name of a database to be created. (valid only for first run)optional
MYSQL_USER=MYSQL_USERThis user will have superuser access to the database specified by MYSQL_DATABASE (do not use root here). (valid only for first run)optional
MYSQL_PASSWORD=DATABASE_PASSWORDSet this to the password you want to use for you MYSQL_USER (minimum 4 characters & non-alphanumeric passwords must be properly escaped). (valid only for first run)optional
REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sqlSet this to ingest sql files from an http/https endpoint (comma seperated array).optional
CLI_OPTS=Pass CLI options to mariadbd via mariadbd-safe. Use with caution as mariadbd option precedence is complex.optional
Volumes
PathFunctionRequired
/configPersistent config filesrequired

Architectures

Pulling :latest picks the right one for your host automatically.

  • x86_64amd64-latest
  • arm64arm64v8-latest

Tags

  • :latestStable releases

Changelog

  1. Rebase to Alpine 3.24.

  2. Rebase to Alpine 3.23. Add ability to pass CLI options to mariadbd.

  3. Rebase to Alpine 3.22.

Related

Browse all

phpmyadmin

5.2.3-ls256

phpmyadmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB.

106K pulls per month31 GitHub starsarm64

sqlitebrowser

3.13.1-r1-ls228

DB Browser for SQLite is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.

45.1K pulls per month37 GitHub starsarm64

mysql-workbench

8.0.47-ls86

MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.

6.3K pulls per month45 GitHub stars