forked from docker-library/mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 5.7, 5.6, and 5.5 to "debian:stretch-slim"
- Loading branch information
Showing
4 changed files
with
33 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
FROM debian:jessie | ||
FROM debian:stretch-slim | ||
|
||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | ||
RUN groupadd -r mysql && useradd -r -g mysql mysql | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/* | ||
|
||
# add gosu for easy step-down from root | ||
ENV GOSU_VERSION 1.7 | ||
RUN set -x \ | ||
|
@@ -12,22 +14,27 @@ RUN set -x \ | |
&& export GNUPGHOME="$(mktemp -d)" \ | ||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ | ||
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ | ||
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ | ||
&& chmod +x /usr/local/bin/gosu \ | ||
&& gosu nobody true \ | ||
&& apt-get purge -y --auto-remove ca-certificates wget | ||
|
||
RUN mkdir /docker-entrypoint-initdb.d | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
# for MYSQL_RANDOM_ROOT_PASSWORD | ||
pwgen \ | ||
# FATAL ERROR: please install the following Perl modules before executing /usr/local/mysql/scripts/mysql_install_db: | ||
# File::Basename | ||
# File::Copy | ||
# Sys::Hostname | ||
# Data::Dumper | ||
RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf /var/lib/apt/lists/* | ||
|
||
perl \ | ||
# mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory | ||
RUN apt-get update && apt-get install -y libaio1 pwgen && rm -rf /var/lib/apt/lists/* | ||
libaio1 \ | ||
# mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory | ||
libncurses5 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV MYSQL_MAJOR 5.5 | ||
ENV MYSQL_VERSION 5.5.59 | ||
|
@@ -40,7 +47,7 @@ RUN apt-get update && apt-get install -y ca-certificates wget --no-install-recom | |
# gpg: key 5072E1F5: public key "MySQL Release Engineering <[email protected]>" imported | ||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 \ | ||
&& gpg --batch --verify mysql.tar.gz.asc mysql.tar.gz \ | ||
&& rm -r "$GNUPGHOME" mysql.tar.gz.asc \ | ||
&& rm -rf "$GNUPGHOME" mysql.tar.gz.asc \ | ||
&& mkdir /usr/local/mysql \ | ||
&& tar -xzf mysql.tar.gz -C /usr/local/mysql --strip-components=1 \ | ||
&& rm mysql.tar.gz \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
FROM debian:jessie | ||
FROM debian:stretch-slim | ||
|
||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | ||
RUN groupadd -r mysql && useradd -r -g mysql mysql | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/* | ||
|
||
# add gosu for easy step-down from root | ||
ENV GOSU_VERSION 1.7 | ||
RUN set -x \ | ||
|
@@ -12,33 +14,37 @@ RUN set -x \ | |
&& export GNUPGHOME="$(mktemp -d)" \ | ||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ | ||
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ | ||
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ | ||
&& chmod +x /usr/local/bin/gosu \ | ||
&& gosu nobody true \ | ||
&& apt-get purge -y --auto-remove ca-certificates wget | ||
|
||
RUN mkdir /docker-entrypoint-initdb.d | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
# for MYSQL_RANDOM_ROOT_PASSWORD | ||
pwgen \ | ||
# FATAL ERROR: please install the following Perl modules before executing /usr/local/mysql/scripts/mysql_install_db: | ||
# File::Basename | ||
# File::Copy | ||
# Sys::Hostname | ||
# Data::Dumper | ||
RUN apt-get update && apt-get install -y perl pwgen --no-install-recommends && rm -rf /var/lib/apt/lists/* | ||
perl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN set -ex; \ | ||
# gpg: key 5072E1F5: public key "MySQL Release Engineering <[email protected]>" imported | ||
key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ | ||
gpg --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \ | ||
rm -r "$GNUPGHOME"; \ | ||
rm -rf "$GNUPGHOME"; \ | ||
apt-key list > /dev/null | ||
|
||
ENV MYSQL_MAJOR 5.6 | ||
ENV MYSQL_VERSION 5.6.39-1debian8 | ||
ENV MYSQL_VERSION 5.6.39-1debian9 | ||
|
||
RUN echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list | ||
RUN echo "deb http://repo.mysql.com/apt/debian/ stretch mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list | ||
|
||
# the "/var/lib/mysql" stuff here is because the mysql-server postinst doesn't have an explicit way to disable the mysql_install_db codepath besides having a database already "configured" (ie, stuff in /var/lib/mysql/mysql) | ||
# also, we set debconf keys to make APT a little quieter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters