1 | FROM ubuntu:16.04 |
---|
2 | |
---|
3 | MAINTAINER Wagner Franchin <wagner.franchin@oracle.com> |
---|
4 | |
---|
5 | RUN apt-get update && apt-get install -y \ |
---|
6 | libaio1 \ |
---|
7 | libnuma1 \ |
---|
8 | && rm -rf /var/lib/apt/lists/* |
---|
9 | |
---|
10 | RUN useradd rpl_user |
---|
11 | |
---|
12 | RUN mkdir -p /mysql |
---|
13 | RUN chown rpl_user /mysql |
---|
14 | USER rpl_user |
---|
15 | |
---|
16 | WORKDIR /mysql |
---|
17 | |
---|
18 | #USER rpl_user |
---|
19 | |
---|
20 | ENV SERVERID 1 |
---|
21 | ENV DATADIR d0 |
---|
22 | ENV PORT 3306 |
---|
23 | |
---|
24 | CMD 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 | |
---|