Deploy with Docker


MariaDB Corporation provides Docker images for MariaDB Enterprise Server in the MariaDB Enterprise Docker Registry.

Docker provides multiple benefits:

  • Docker is an open platform for developing, shipping, and running applications that allows you to separate your applications from your infrastructure.

  • Docker images are portable. A Docker image can be deployed in a Docker container on any system using the Docker platform, regardless of the host operating system.

  • Docker containers are isolated from the host operating system and from other Docker containers.

The Docker images for MariaDB Enterprise Server are currently beta maturity, so they are not currently recommended for production.

If you want to deploy MariaDB Enterprise Server without Docker, alternative deployment methods are available.

Use Cases

MariaDB Enterprise Server can be deployed with Docker to support use cases that require software to be rapidly deployed on existing infrastructure, such as:

  • Continuously create and destroy automated testing environments as part of a continuous integration (CI) pipeline

  • Create a small test environment on a local workstation

  • Create multiple isolated test environments on the same host


The following products and versions can be deployed using the MariaDB Enterprise Docker Registry:

  • MariaDB Enterprise Server 10.4

  • MariaDB Enterprise Server 10.5

  • MariaDB Enterprise Server 10.6

For details about which storage engines and plugins are supported in the images for each version, see "MariaDB Enterprise Docker Registry".

Deploy Enterprise Server in a Docker Container

To deploy MariaDB Enterprise Server in a Docker container, follow the instructions below.

Step 1: Retrieve Customer Download Token

MariaDB Corporation requires customers to authenticate when logging in to the MariaDB Enterprise Docker Registry. A customer-specific Customer Download Token must be provided as the password.

Customer Download Tokens are available through the MariaDB Customer Portal.

To retrieve the customer download token for your account:

  1. Navigate to the Customer Download Token at the MariaDB Customer Portal.

  2. Log in using your MariaDB ID.

  3. Copy the Customer Download Token to use as the password when logging in to the MariaDB Enterprise Docker Registry.

Step 2: Log In to Docker Registry

Log in to the MariaDB Enterprise Docker Registry by executing docker login:

$ docker login

When prompted, enter the login details:

The login details will be saved.

Confirm the login details were saved by checking the ~/.docker/config.json file for a JSON object named "" inside an "auths" parent JSON object:

$ cat ~/.docker/config.json
   "auths": {
      "": {
         "auth": "<auth_hash>"

Step 3: Choose an Image Tag

The enterprise-server repository in the MariaDB Enterprise Docker Registry contains images for different MariaDB Enterprise Server releases using specific tags. Before continuing, you will need to decide which tag to use.

To deploy a container using the most recent image for the latest MariaDB Enterprise Server release series (currently 10.6), use the latest tag.

For additional information, see "MariaDB Enterprise Docker Registry: Supported Tags".

Step 4: Pull Docker Image

Pull the Docker image with the chosen tag by executing docker pull:

$ docker pull
latest: Pulling from enterprise-server
5d87d5506868: Pull complete
Digest: sha256:68795ca747901e3402e30dab71d6d8bc72bce727db3b9e4888979468be77d250
Status: Downloaded newer image for

Confirm the Docker image has been pulled by executing docker images:

$ docker images \
REPOSITORY                             TAG       IMAGE ID       CREATED        SIZE   latest    dd17291aa340   3 months ago   451MB

Step 5: Create a Container

Create a container using the pulled Docker image by executing docker run:

$ docker run --detach \
   --name mariadb-es-latest \
   --env MARIADB_ROOT_PASSWORD='Password123!' \
   --publish '3307:3306/tcp' \ \
   --log-bin=mariadb-bin \
   <other mariadbd command-line options>
  • Configure the container and set the root password using environment variables by setting the --env command-line option.

  • Configure port bindings for the container by setting the --publish or --publish-all command-line options.

  • Configure MariaDB Enterprise Server by setting mariadbd command-line options.

Confirm the container is running by executing docker ps:

$ docker ps \
   --all \
   --filter ancestor=''
CONTAINER ID   IMAGE                                         COMMAND                  CREATED          STATUS                      PORTS      NAMES
3082ab69e565   "/ -…"   12 seconds ago   Up 11 seconds               3306/tcp   mariadb-es-latest

By default, Docker uses Docker bridge networking for new containers. For details on how to use host networking for new containers, see "Create a Container with Host Networking".

For details on how to use custom configuration files, load database dumps, or execute shell scripts in new containers, see "Create a Container with a Custom es-initdb.d Directory".

Step 6: Connect to Container

Connect to the container by executing MariaDB Client on the container using docker exec:

$ docker exec --interactive --tty \
   mariadb-es-latest \
   mariadb \
   --user=root \

Confirm the container is using the correct version of MariaDB Enterprise Server by querying the version system variable with the SHOW GLOBAL VARIABLES statement:

   LIKE 'version'\G
*************************** 1. row ***************************
Variable_name: version
        Value: 10.6.7-3-MariaDB-enterprise-log