Skip to content

Commit

Permalink
Merge pull request docker-library#232 from infosiftr/docker.cnf
Browse files Browse the repository at this point in the history
Move docker-specific [mysqld] additions to their own "docker.cnf" file
  • Loading branch information
yosifkit authored Nov 1, 2016
2 parents b2b4fcf + 10eb5ea commit 9584428
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions 5.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ RUN { \
# comment out a few problematic configuration values
# don't reverse lookup hostnames, they are usually another container
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf \
&& echo 'skip-host-cache\nskip-name-resolve' | awk '{ print } $1 == "[mysqld]" && c == 0 { c = 1; system("cat") }' /etc/mysql/my.cnf > /tmp/my.cnf \
&& mv /tmp/my.cnf /etc/mysql/my.cnf
&& echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf

VOLUME /var/lib/mysql

Expand Down
3 changes: 1 addition & 2 deletions 5.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ RUN { \
# comment out a few problematic configuration values
# don't reverse lookup hostnames, they are usually another container
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/mysql.conf.d/mysqld.cnf \
&& echo 'skip-host-cache\nskip-name-resolve' | awk '{ print } $1 == "[mysqld]" && c == 0 { c = 1; system("cat") }' /etc/mysql/mysql.conf.d/mysqld.cnf > /tmp/mysqld.cnf \
&& mv /tmp/mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
&& echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf

VOLUME /var/lib/mysql

Expand Down
3 changes: 1 addition & 2 deletions 8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ RUN { \
# comment out a few problematic configuration values
# don't reverse lookup hostnames, they are usually another container
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/mysql.conf.d/mysqld.cnf \
&& echo 'skip-host-cache\nskip-name-resolve' | awk '{ print } $1 == "[mysqld]" && c == 0 { c = 1; system("cat") }' /etc/mysql/mysql.conf.d/mysqld.cnf > /tmp/mysqld.cnf \
&& mv /tmp/mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
&& echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf

VOLUME /var/lib/mysql

Expand Down

0 comments on commit 9584428

Please sign in to comment.