GROUPReplicate2: Dockerfile

File Dockerfile, 958 bytes (added by krit, 2 years ago)
Line 
1FROM ubuntu:16.04
2
3MAINTAINER Wagner Franchin <wagner.franchin@oracle.com>
4
5RUN apt-get update && apt-get install -y \
6  libaio1 \
7  libnuma1 \
8  && rm -rf /var/lib/apt/lists/*
9
10RUN useradd rpl_user
11
12RUN mkdir -p /mysql
13RUN chown rpl_user /mysql
14USER rpl_user
15
16WORKDIR /mysql
17
18#USER rpl_user
19
20ENV SERVERID 1
21ENV DATADIR d0
22ENV PORT 3306
23
24CMD rm -rf $PWD/$DATADIR && ./bin/mysqld --no-defaults --datadir=$PWD/$DATADIR \
25  --basedir=$PWD --initialize-insecure && \
26  ./bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/$DATADIR \
27  --socket=/tmp/mysql.0.sock --log-bin=mysql-bin-1.log --server_id=$SERVERID \
28  --port=$PORT --enforce-gtid-consistency --log-slave-updates --gtid-mode=on \
29  --transaction-write-set-extraction=XXHASH64 --binlog-checksum=NONE \
30  --master-info-repository=TABLE --relay_log_info_repository=TABLE \
31  --plugin-dir=lib/plugin/ --plugin-load=group_replication.so --relay-log-recovery=on \
32  --group_replication_start_on_boot=0
33