-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpercona-8.0
27 lines (25 loc) · 920 Bytes
/
percona-8.0
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
# vi: ft=dockerfile
FROM percona:8.0
USER root
RUN set -eux \
&& mkdir -p /etc/mysql/docker-default.d/ \
&& if [ -f /etc/my.cnf ]; then \
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/my.cnf; \
elif [ -f /etc/mysql/my.cnf ]; then \
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
else \
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
false; \
fi \
# Allow native password handling for MySQL 8.0
&& sed -i'' "s|^pid-file=.*$|pid-file=/var/run/mysqld/mysqld.pid\ndefault-authentication-plugin=mysql_native_password|g" /etc/my.cnf \
&& if [ -f "/entrypoint.sh" ]; then \
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
fi \
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
fi \
&& chmod +x "/docker-entrypoint.sh"
USER mysql
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["mysqld"]