Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Galera build #11

Open
wants to merge 3 commits into
base: galera
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions conf/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ MAINTAINER Nick Vyzas <[email protected]>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv BC19DDBA
RUN add-apt-repository 'deb https://releases.galeracluster.com/galera-4/ubuntu bionic main'
RUN add-apt-repository 'deb https://releases.galeracluster.com/mysql-wsrep-8.0/ubuntu bionic main'
RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv BC19DDBA && \
add-apt-repository 'deb https://releases.galeracluster.com/galera-4/ubuntu bionic main' && \
add-apt-repository 'deb https://releases.galeracluster.com/mysql-wsrep-8.0/ubuntu bionic main' && \
apt-get update && \
apt-get install -y galera-4 galera-arbitrator-4 mysql-wsrep-8.0 rsync && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN apt-get update
RUN apt-get install -y galera-4 galera-arbitrator-4 mysql-wsrep-8.0 rsync

RUN chown -R mysql:mysql /var/lib/mysql
RUN mkdir -p /var/run/mysqld/ && chown -R mysql:mysql /var/run/mysqld

RUN apt-get clean
RUN chown -R mysql:mysql /var/lib/mysql && \
mkdir -p /var/run/mysqld/ && \
chown -R mysql:mysql /var/run/mysqld

ENTRYPOINT ["mysqld"]
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "2.0"
services:
mysql1:
image: "proxysql/galera:latest"
build: ./conf/mysql
ports:
- "13306:3306"
Expand All @@ -11,6 +12,7 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=root
mysql2:
image: "proxysql/galera:latest"
build: ./conf/mysql
ports:
- "13307:3306"
Expand All @@ -23,6 +25,7 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=root
mysql3:
image: "proxysql/galera:latest"
build: ./conf/mysql
ports:
- "13308:3306"
Expand Down