github.com/mre-fog/trillianxx@v1.1.2-0.20180615153820-ae375a99d36a/storage/mysql/kubernetes/image/Dockerfile (about) 1 # Original work: Copyright 2016 The Kubernetes Authors. 2 # Modified work: Copyright 2017 Google Inc. All Rights Reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 FROM ubuntu:trusty 17 18 # add our user and group first to make sure their IDs get assigned 19 # consistently, regardless of whatever dependencies get added 20 RUN groupadd -r mysql && useradd -r -g mysql mysql 21 22 ENV MYSQL_VERSION 5.7 23 ENV TERM linux 24 25 # Install perl. 26 # Install dig, for discovering IP addresses of other Galera nodes. 27 RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y dnsutils perl --no-install-recommends 28 RUN rm -rf /var/lib/apt/lists/* 29 30 RUN apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A 9334A25F8507EFA5 31 32 RUN echo "deb http://repo.percona.com/apt trusty main" > /etc/apt/sources.list.d/percona.list 33 RUN echo "deb-src http://repo.percona.com/apt trusty main" >> /etc/apt/sources.list.d/percona.list 34 35 RUN { \ 36 echo percona-server-server-${MYSQL_VERSION} percona-server-server/root_password password ''; \ 37 } | debconf-set-selections \ 38 && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y percona-xtradb-cluster-client-"${MYSQL_VERSION}" \ 39 percona-xtradb-cluster-common-"${MYSQL_VERSION}" percona-xtradb-cluster-server-"${MYSQL_VERSION}" \ 40 && rm -rf /var/lib/apt/lists/* 41 42 COPY my.cnf /etc/mysql/my.cnf 43 COPY cluster.cnf /etc/mysql/conf.d/cluster.cnf 44 RUN mkdir -p /var/lib/mysql 45 RUN chown -R mysql:mysql /etc/mysql /var/lib/mysql 46 VOLUME /var/lib/mysql 47 48 COPY docker-entrypoint.sh /entrypoint.sh 49 ENTRYPOINT ["/entrypoint.sh"] 50 51 EXPOSE 3306 4444 4567 4568 52 CMD ["mysqld"]