To use this docker image in production, it would be very nice to be able to run it with replication, to maintain some redundancy.
The bitnami/mariadb image already does this, but they don't have the 10.x versions.
Would Galera cover that for you (https://github.com/docker-library/mariadb/pull/24) or are you looking at the autoconfiguration that is in their script (https://github.com/bitnami/bitnami-docker-mariadb/blob/master/rootfs/bitnami-utils-custom.sh)?
I am on the same path
mariadb has this build it from 10.1 and after
this is resolved https://github.com/docker-library/mariadb/issues/29
it would be nice to implement some sort of env to bootstrap only the first time the container is lunched using the mysqld --wsrep-new-cluster and then any additional container can join the cluster
with mysqld --wsrep_cluster_address=gcomm://container_name
If anyone is interested - this is not very straightforward, but doable.
You can find scalable MariaDB image that requires no configuration here: https://github.com/nazar-pc/docker-webserver
Please, read readme and advanced documentation carefully, it really works well.
I'm working on GlusterFS image, so that literally everything will scale with zero configuration, but MariaDB works fine already.
Comparing to Bitnami's images my images look a bit simpler and uses this MariaDB official image as base image. Take a look and let me know what you think.
BTW, I'm not sure that that PR with Galera support is really as good as it could be. Also I have such feeling, that official image should not provide Galera setup, it is tricky and will not be flexible enough eventually. Current image is good enough and contains most of necessary basic blocks to build Galera image yourself while nicely reusing what is done here already.
thanks I will check it.
I will not advise you to go for the GlusterFS , especialy for web apps. I haven't tested it myself , but the feedback is that is quite slow for when accessing many small files.
I have setup 2x lsyncd container and so far it syncs really well. It is kind of a rsync daemon , watches for changes and it fires rsync
The documentation sais not fit for 2 way sync , but in my setup it works very , very well.
Here is the repo, It is not universal but you don't have time right now to improve it.
https://github.com/vipconsult/dockerfiles/tree/master/lsyncd
I start is with the same compose file on both hosts
lsyncd:
# so that can increase fs.inotify.max_user_watches
privileged: true
# without net host it cannot bind to the internal ip
net: host
volumes:
# share the same keys on all containers so that no ssh config is needed
- ../lsyncd/.ssh:/root/.ssh
# the actual folders that will be synced
- /folder1ToShare:/sync/f1
- /folder2ToShare:/sync/.f2
it needs 2 env variables
$INTERNAL_IP - ot binds to this ip
$LB_SERVER - it connects to this ip on port 222
on host 1
$INTERNAL_IP - 172.0.0.10
$LB_SERVER - 172.0.0.20
on host 2
$INTERNAL_IP - 172.0.0.20
$LB_SERVER - 172.0.0.10