Percona XtraDB Cluster Docker 集群方案
构建master
docker build -t xtradb:master .
构建slave
docker build -t xtradb:slave .
docker run -d --name xtradbnode1 -p 3306:3306 daocloud.io/onatkh/xtradb-master:master-init /usr/bin/mysqld_safe
docker run -d --name xtradbnode2 -p 13306:3306 --link xtradbnode1:node1 daocloud.io/onatkh/xtradb-slave:master-init /usr/bin/mysqld_safe
通过mysql命定行查看是否成功
mysql$:show global status like 'wsrep_cluster_size';
master镜像:daocloud.io/onatkh/xtradb-master:master-init
pull:docker pull daocloud.io/onatkh/xtradb-master:master-init
镜像:daocloud.io/onatkh/xtradb-slave:master-init
pull:docker pull daocloud.io/onatkh/xtradb-slave:master-init
http://www.oschina.net/translate/percona-xtradb-cluster-how-to-run-a-2-node-cluster-on-a-single-server