← Back to team overview

maria-discuss team mailing list archive

CentOS Docker Container Image not only for OpenShift

 

For those who are interested in containers, I'd like to share a Docker image that we've produced in Red Hat in cooperation with OpenShift guys. And will be really glad for any feedback you have.

The image can be used in OpenShift or run directly. But what I find really interesting is a PoC implementation of master/slave, that is not documented as official feature yet, but it can be used as simple as that:

  docker pull centos/mariadb-100-centos7

  docker run -e MYSQL_MASTER_USER=master \
             -e MYSQL_MASTER_PASSWORD=master \
             -e MYSQL_DATABASE=db \
             -e MYSQL_USER=user \
             -e MYSQL_PASSWORD=foo \
             -e MYSQL_ROOT_PASSWORD=rootpasswd \
             -d centos/mariadb-100-centos7 mysqld-master

  docker run -e MYSQL_MASTER_USER=master \
             -e MYSQL_MASTER_PASSWORD=master \
             -e MYSQL_DATABASE=db \
             -e MYSQL_MASTER_SERVICE_NAME=<master_ip> \
             -d centos/mariadb-100-centos7 mysqld-slave

More info about the image available here:
https://hub.docker.com/r/centos/mariadb-100-centos7/

As said above, any feedback welcome :)

Honza