Skip to content

Commit

Permalink
Merge pull request docker-library#89 from infosiftr/skip-name-resolve
Browse files Browse the repository at this point in the history
Skip reverse DNS lookups
  • Loading branch information
tianon committed Aug 11, 2015
2 parents b1ae527 + 6d1c7c7 commit c402b76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 5.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts
RUN mkdir -p /etc/mysql/conf.d \
&& { \
echo '[mysqld]'; \
echo 'skip-host-cache'; \
echo 'skip-name-resolve'; \
echo 'user = mysql'; \
echo 'datadir = /var/lib/mysql'; \
echo '!includedir /etc/mysql/conf.d/'; \
Expand Down
5 changes: 4 additions & 1 deletion 5.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ RUN { \
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql

# comment out a few problematic configuration values
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf
# 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

VOLUME /var/lib/mysql

Expand Down
5 changes: 4 additions & 1 deletion 5.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ RUN { \
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql

# comment out a few problematic configuration values
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf
# 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

VOLUME /var/lib/mysql

Expand Down

0 comments on commit c402b76

Please sign in to comment.