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.
Switch to sourcing from the Oracle-compiled binaries instead of compi…
…ling from source
- Loading branch information
Showing
2 changed files
with
52 additions
and
40 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 |
---|---|---|
|
@@ -3,31 +3,37 @@ FROM debian:wheezy | |
# 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 \ | ||
bison \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
libncurses5-dev | ||
# 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/* | ||
|
||
# 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 && rm -rf /var/lib/apt/lists/* | ||
|
||
# gpg: key 5072E1F5: public key "MySQL Release Engineering <[email protected]>" imported | ||
RUN gpg --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 | ||
|
||
ENV MYSQL_MAJOR 5.6 | ||
ENV MYSQL_VERSION 5.6.20 | ||
|
||
RUN mkdir /usr/src/mysql \ | ||
&& curl -SL "https://dev.mysql.com/get/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION.tar.gz" \ | ||
| tar -xzC /usr/src/mysql --strip-components=1 \ | ||
&& cd /usr/src/mysql \ | ||
&& cmake . -DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_EMBEDDED_SERVER=OFF \ | ||
&& make -j"$(nproc)" \ | ||
&& make test \ | ||
&& make install \ | ||
&& cd .. \ | ||
&& rm -rf mysql \ | ||
&& rm -rf /usr/local/mysql/mysql-test \ | ||
&& rm -rf /usr/local/mysql/sql-bench \ | ||
# note: we're pulling the *.asc file from mysql.he.net instead of dev.mysql.com because the official mirror 404s that file for whatever reason - maybe it's at a different path? | ||
RUN apt-get update && apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \ | ||
&& curl -SL "http://dev.mysql.com/get/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION-linux-glibc2.5-x86_64.tar.gz" -o mysql.tar.gz \ | ||
&& curl -SL "http://mysql.he.net/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION-linux-glibc2.5-x86_64.tar.gz.asc" -o mysql.tar.gz.asc \ | ||
&& apt-get purge -y --auto-remove curl \ | ||
&& gpg --verify mysql.tar.gz.asc \ | ||
&& mkdir /usr/local/mysql \ | ||
&& tar -xzf mysql.tar.gz -C /usr/local/mysql --strip-components=1 \ | ||
&& rm mysql.tar.gz* \ | ||
&& rm -rf /usr/local/mysql/mysql-test /usr/local/mysql/sql-bench \ | ||
&& rm -rf /usr/local/mysql/bin/*-debug /usr/local/mysql/bin/*_embedded \ | ||
&& find /usr/local/mysql -type f -name "*.a" -delete \ | ||
&& { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; } | ||
&& apt-get update && apt-get install -y binutils && rm -rf /var/lib/apt/lists/* \ | ||
&& { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; } \ | ||
&& apt-get purge -y --auto-remove binutils | ||
ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts | ||
|
||
WORKDIR /usr/local/mysql | ||
|
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 |
---|---|---|
|
@@ -3,31 +3,37 @@ FROM debian:wheezy | |
# 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 \ | ||
bison \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
libncurses5-dev | ||
# 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/* | ||
|
||
# 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 && rm -rf /var/lib/apt/lists/* | ||
|
||
# gpg: key 5072E1F5: public key "MySQL Release Engineering <[email protected]>" imported | ||
RUN gpg --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 | ||
|
||
ENV MYSQL_MAJOR 5.7 | ||
ENV MYSQL_VERSION 5.7.4-m14 | ||
|
||
RUN mkdir /usr/src/mysql \ | ||
&& curl -SL "https://dev.mysql.com/get/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION.tar.gz" \ | ||
| tar -xzC /usr/src/mysql --strip-components=1 \ | ||
&& cd /usr/src/mysql \ | ||
&& cmake . -DCMAKE_BUILD_TYPE=Release \ | ||
-DWITH_EMBEDDED_SERVER=OFF \ | ||
&& make -j"$(nproc)" \ | ||
&& make test \ | ||
&& make install \ | ||
&& cd .. \ | ||
&& rm -rf mysql \ | ||
&& rm -rf /usr/local/mysql/mysql-test \ | ||
&& rm -rf /usr/local/mysql/sql-bench \ | ||
# note: we're pulling the *.asc file from mysql.he.net instead of dev.mysql.com because the official mirror 404s that file for whatever reason - maybe it's at a different path? | ||
RUN apt-get update && apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \ | ||
&& curl -SL "http://dev.mysql.com/get/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION-linux-glibc2.5-x86_64.tar.gz" -o mysql.tar.gz \ | ||
&& curl -SL "http://mysql.he.net/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION-linux-glibc2.5-x86_64.tar.gz.asc" -o mysql.tar.gz.asc \ | ||
&& apt-get purge -y --auto-remove curl \ | ||
&& gpg --verify mysql.tar.gz.asc \ | ||
&& mkdir /usr/local/mysql \ | ||
&& tar -xzf mysql.tar.gz -C /usr/local/mysql --strip-components=1 \ | ||
&& rm mysql.tar.gz* \ | ||
&& rm -rf /usr/local/mysql/mysql-test /usr/local/mysql/sql-bench \ | ||
&& rm -rf /usr/local/mysql/bin/*-debug /usr/local/mysql/bin/*_embedded \ | ||
&& find /usr/local/mysql -type f -name "*.a" -delete \ | ||
&& { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; } | ||
&& apt-get update && apt-get install -y binutils && rm -rf /var/lib/apt/lists/* \ | ||
&& { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; } \ | ||
&& apt-get purge -y --auto-remove binutils | ||
ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts | ||
|
||
WORKDIR /usr/local/mysql | ||
|