forked from des4maisons/docker-percona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (29 loc) · 984 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM centos:6
RUN \
yum -y update && yum clean all && \
rpm -Uvh http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm && \
yum -y install \
inotify-tools \
Percona-Server-client-55-5.5.41-rel37.0.el6 \
Percona-Server-server-55-5.5.41-rel37.0.el6 \
Percona-Server-shared-55-5.5.41-rel37.0.el6 \
percona-xtrabackup-2.2.8-5059.el6 && \
mkdir -p /etc/mysql/conf.d \
&& { \
echo '[mysqld]'; \
echo '!includedir /etc/mysql/conf.d/'; \
} > /etc/mysql/my.cnf \
&& { \
echo '[mysqld]'; \
echo 'user = mysql'; \
echo 'datadir = /var/lib/mysql'; \
} > /etc/mysql/conf.d/docker.cnf
RUN \
mysqld_safe & \
/usr/bin/mysqladmin --silent --wait=30 ping || exit 1 && \
mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "root"@"%" WITH GRANT OPTION;'
VOLUME ["/var/lib/mysql", "/etc/mysql/conf.d/"]
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 3306
CMD ["/usr/sbin/mysqld"]