Introducing Docker images for MariaDB Enterprise Server

spacer

MariaDB Corporation recently released the MariaDB Enterprise Docker Registry, which provides Docker images for MariaDB Enterprise Server.

This enables the ability to download, install and use MariaDB Enterprise Server using Docker, an open platform for developing, shipping and running applications without having to manage infrastructure.

Docker accomplishes this through the process of providing an image that allows you to create a new container.

Docker Image & Container Relationship

More specifically, MariaDB Corporation Subscription customers can now use official MariaDB Enterprise Server images to create Docker containers. Containers provide a portable, isolated way to manage software without having to worry about the host operating system.

The Simplicity of Containerization

You may already be aware that versions of MariaDB Community Server have been available as Docker images for some time now.

Docker image running multiple MariaDB containers

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

  • Continuously creating and destroying automated testing environments as part of a continuous integration (CI) pipeline.
  • Creating a small test environment on a local workstation.
  • Creating multiple isolated test environments on the same host.

Creating a MariaDB Enterprise Docker Container

Getting started with the MariaDB Enterprise Docker Registry to pull down a MariaDB Enterprise Server image and then spin up a container is a quick and easy process.

Tip: For more information, including more detailed reference material, on working with MariaDB Enterprise Docker Registry to create and deploy a Docker container be sure to check out the official documentation.

Step 1: Get your MariaDB customer download token

To use the MariaDB Enterprise Docker Registry you’re going to need to provide the customer download token as the password when prompted.

So, to retrieve the token you’ll need to do the following:

  1. Navigate to the Customer Download Token page within the MariaDB Customer Portal.
  2. Log in using your MariaDB ID.
  3. Copy the Customer Download Token, which will be used later as the password for logging in to the MariaDB Enterprise Docker Registry.

Customer download token

Step 2: Log in to Docker Registry

Using the docker command log in to the MariaDB Docker Registry by executing the following command:

$ docker login docker.mariadb.com

Then, when prompted, enter the login credentials:

  • Username: The email address associated with your MariaDB ID.
  • Password: The Customer Download Token that you obtained in Step 1.

Terminal login credentials

Step 3: Pull the Docker image

The enterprise-server repository, within MariaDB Enterprise Docker Registry, contains a variety of images mapped to different MariaDB Enterprise release versions using specific tags.

Note: In this walkthrough I’ll be using the latest tag, which refers to the most recent image for the latest MariaDB Server release. For more information on the available tags be sure to check out the official documentation.

Pull the the latest Docker image using the following command:

$ docker pull docker.mariadb.com/enterprise-server:latest

Step 4: Create a new container

Once you’ve pulled down the MariaDB Enterprise Server Docker image you’re now able to create a new container.

$ docker run --detach --name mariadb-es-latest --env \
     MARIADB_ROOT_PASSWORD='Password123!' \
     docker.mariadb.com/enterprise-server:latest

Which will return a new container ID.

New container ID

Step 5: Connect to the container and use MariaDB Enterprise Server

Finally, you can confirm that the container has been created and that MariaDB Enterprise Server has been successfully started by connecting to the container and accessing the mariadb command-line client included within the container.

$ docker exec -it mariadb-es-latest mariadb -u root -pPassword123!

Learn more

If you’d like to learn more about how you can get started using the MariaDB Enterprise Docker Registry to start managing containerized versions of MariaDB Enterprise you can find more information in the official documentation.

And, as always, if you’d like to learn more about MariaDB’s features and capabilities be sure to check out the following resources:

Happy building!