Public Repository

Last pushed: 2 months ago
Short Description
Percona XtraDB Cluster 5.7 with Docker Swarm Discovery. No etcd
Full Description

Supported tags and respective Dockerfile links

https://github.com/percona/percona-docker/pull/13

Create docker network

docker network create --opt encrypted --driver overlay mysql_net

RUN
docker service create \
--publish 3306:3306 \
--name mysql \
--replicas 1 \
--network mysql_net \
-e MYSQL_ROOT_PASSWORD=1 \
-e CLUSTER_NAME=cl  \
-e SERVICE_ID={{.Service.ID}} \
-e SERVICE_NAME={{.Service.Name}} \
-e TASK_ID={{.Task.ID}} \
-e TASK_NAME={{.Task.Name}} \
-e TASK_SLOT={{.Task.Slot}} \
--mount type=bind,src=/home/apps/volumes/mysql/{{.Task.Slot}},dst=/var/lib/mysql \
--mount type=bind,src=/home/apps/log/mysql/{{.Task.Slot}},dst=/var/log/mysql \
gleez/mysql:5.7 bash -c "(/entrypoint.sh mysqld &) && while true; do  dig +short tasks.mysql | xargs -n1 ping -w1 -c1 ; sleep 2; done"
Docker Pull Command
Owner
gleez

Comments (0)