Title logo
linuxserver/mariadb.

A Mariadb container, brought to you by LinuxServer.io.

403,867,449 387 arm64 amd64

Build Information

General build information for this image

Docker Hub linuxserver/mariadb
Build Time 23 Apr 2024 07:48:45
Synchronised Yes
Stable Yes
Deprecated No

Tracked Tags

Known tags which link to a specific branched app version.

Branch Version Built
latest 10.11.6 23 Apr 2024 at 07:48:44
alpine 10.5.17-alpine 27 Sep 2022 at 09:26:53

Daily Pull Statistics

Running this as a container

Basic examples for getting this image running as a container

Docker Compose

---
version: "2"
services:
  mariadb:
    image: linuxserver/mariadb:10.11.6
    container_name: mariadb
    restart: unless-stopped
    environment:
      - TZ=Europe/London # Specify a timezone to use EG Europe/London.
      - REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sql # Set this to ingest sql files from an http/https endpoint (comma seperated array).
      - PUID=1000 # for UserID
      - PGID=1000 # for GroupID
      - MYSQL_USER=MYSQL_USER # This user will have superuser access to the database specified by MYSQL_DATABASE (do not use root here).
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD # Set this to root password for installation (minimum 4 characters).
      - MYSQL_PASSWORD=DATABASE_PASSWORD # Set this to the password you want to use for you MYSQL_USER (minimum 4 characters).
      - MYSQL_DATABASE=USER_DB_NAME # Specify the name of a database to be created on image startup.
    volumes:
      - /host/path/to/config:/config # Contains the db itself and all assorted settings.
    ports:
      - 3306:3306/tcp # Mariadb listens on this port.

CLI

docker create \
  --name=mariadb \
  -e TZ=Europe/London `# Specify a timezone to use EG Europe/London.` \
  -e REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sql `# Set this to ingest sql files from an http/https endpoint (comma seperated array).` \
  -e PUID=1000 `# for UserID` \
  -e PGID=1000 `# for GroupID` \
  -e MYSQL_USER=MYSQL_USER `# This user will have superuser access to the database specified by MYSQL_DATABASE (do not use root here).` \
  -e MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD `# Set this to root password for installation (minimum 4 characters).` \
  -e MYSQL_PASSWORD=DATABASE_PASSWORD `# Set this to the password you want to use for you MYSQL_USER (minimum 4 characters).` \
  -e MYSQL_DATABASE=USER_DB_NAME `# Specify the name of a database to be created on image startup.` \
  -v /host/path/to/config:/config `# Contains the db itself and all assorted settings.` \
  -p 3306:3306/tcp `# Mariadb listens on this port.` \
  --restart unless-stopped \
  linuxserver/mariadb:10.11.6