This repository contains Dockerfiles that I use to deploy MariaDB Enterprise Server, MariaDB Community Server, and MariaDB MaxScale to run some of my example applications and demos.
- A Linux or Mac environment (on Windows use WSL)
- Docker
- (Optional) A MariaDB Customer Download Token if you want to use MariaDB Enterprise.
Build the images using the build.sh script:
./build.sh
Note: If you want to build the MariaDB Enterprise image, you need to pass es
as a parameter to build.sh
. You also need to define the following environment variable using your Customer Download Token value:
export CUSTOMER_DOWNLOAD_TOKEN=xxxxx-xxxx-xxxxx-xxx-xxxxx
Create a private registry:
docker run --name docker-registry \
--detach \
--restart=always \
--mount source=docker-registry,target=/var/lib/registry \
--publish 5000:5000 \
--env REGISTRY_STORAGE_DELETE_ENABLED=true \
registry:2
Publish the images in the Docker registry by passing the registry host to the publish.sh script (add a trailing /
):
./publish.sh your.hostname.local:5000/
You might have to list the new registry as insecure in the /etc/docker/daemon.json
file of any machine from which you want to use the images:
{
"insecure-registries" : ["your.hostname.local:5000"]
}
Note: If you want to publish the MariaDB Enterprise image, pass es
as a parameter of publish.sh
followed by the URL of your private Docker registry.
See the test.sh and mariadb.stack.yml files for examples on how to use the images.