Skip to content

Commit 9bbf1e5

Browse files
authored
Merge pull request #282 from mysql/master
Use new -core packages for 8.0.1+
2 parents 6b1dc54 + dc60c4b commit 9bbf1e5

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

8.0/Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FROM debian:jessie
2-
32
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
43
RUN groupadd -r mysql && useradd -r -g mysql mysql
54

@@ -54,19 +53,15 @@ RUN { \
5453
echo mysql-community-server mysql-community-server/re-root-pass password ''; \
5554
echo mysql-community-server mysql-community-server/remove-test-db select false; \
5655
} | debconf-set-selections \
57-
&& apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* \
56+
&& apt-get update && apt-get install -y mysql-community-client-core="${MYSQL_VERSION}" mysql-community-server-core="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* \
5857
&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
5958
&& chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
6059
# 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
6160
&& chmod 777 /var/run/mysqld
6261

63-
# comment out a few problematic configuration values
64-
# 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 \
66-
&& echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf
67-
6862
VOLUME /var/lib/mysql
69-
63+
# Config files
64+
COPY config/ /etc/mysql/
7065
COPY docker-entrypoint.sh /usr/local/bin/
7166
RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
7267
ENTRYPOINT ["docker-entrypoint.sh"]

8.0/config/conf.d/docker.cnf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[mysqld]
2+
skip-host-cache
3+
skip-name-resolve

8.0/config/my.cnf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
2+
#
3+
# This program is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation; version 2 of the License.
6+
#
7+
# This program is distributed in the hope that it will be useful,
8+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
# GNU General Public License for more details.
11+
#
12+
# You should have received a copy of the GNU General Public License
13+
# along with this program; if not, write to the Free Software
14+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
16+
#
17+
# The MySQL Server configuration file.
18+
#
19+
# For explanations see
20+
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
21+
22+
[mysqld]
23+
pid-file = /var/run/mysqld/mysqld.pid
24+
socket = /var/run/mysqld/mysqld.sock
25+
datadir = /var/lib/mysql
26+
secure-file-priv= NULL
27+
# Disabling symbolic-links is recommended to prevent assorted security risks
28+
symbolic-links=0
29+
30+
# Custom config should go here
31+
!includedir /etc/mysql/conf.d/

0 commit comments

Comments
 (0)