File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,12 @@ RUN { \
5252 && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
5353 && chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
5454# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
55- && chmod 777 /var/run/mysqld
56-
55+ && chmod 777 /var/run/mysqld \
5756# comment out a few problematic configuration values
57+ && find /etc/mysql/ -name '*.cnf' -print0 \
58+ | xargs -0 grep -lZE '^(bind-address|log)' \
59+ | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/' \
5860# don't reverse lookup hostnames, they are usually another container
59- RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf \
6061 && echo '[mysqld]\n skip-host-cache\n skip-name-resolve' > /etc/mysql/conf.d/docker.cnf
6162
6263VOLUME /var/lib/mysql
Original file line number Diff line number Diff line change @@ -58,11 +58,12 @@ RUN { \
5858 && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
5959 && chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
6060# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
61- && chmod 777 /var/run/mysqld
62-
61+ && chmod 777 /var/run/mysqld \
6362# comment out a few problematic configuration values
63+ && find /etc/mysql/ -name '*.cnf' -print0 \
64+ | xargs -0 grep -lZE '^(bind-address|log)' \
65+ | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/' \
6466# don't reverse lookup hostnames, they are usually another container
65- RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/mysql.conf.d/mysqld.cnf \
6667 && echo '[mysqld]\n skip-host-cache\n skip-name-resolve' > /etc/mysql/conf.d/docker.cnf
6768
6869VOLUME /var/lib/mysql
You can’t perform that action at this time.
0 commit comments