@@ -3,31 +3,37 @@ FROM debian:wheezy
33# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
44RUN groupadd -r mysql && useradd -r -g mysql mysql
55
6- RUN apt-get update && apt-get install -y \
7- bison \
8- build-essential \
9- cmake \
10- curl \
11- libncurses5-dev
6+ # FATAL ERROR: please install the following Perl modules before executing /usr/local/mysql/scripts/mysql_install_db:
7+ # File::Basename
8+ # File::Copy
9+ # Sys::Hostname
10+ # Data::Dumper
11+ RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf /var/lib/apt/lists/*
12+
13+ # mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
14+ RUN apt-get update && apt-get install -y libaio1 && rm -rf /var/lib/apt/lists/*
15+
16+ # gpg: key 5072E1F5: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
17+ RUN gpg --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1218
1319ENV MYSQL_MAJOR 5.7
1420ENV MYSQL_VERSION 5.7.4-m14
1521
16- RUN mkdir /usr/src/mysql \
17- && curl -SL "https://dev.mysql.com/get/Downloads/MySQL-$MYSQL_MAJOR/mysql-$MYSQL_VERSION.tar.gz" \
18- | tar -xzC /usr/src/mysql --strip-components=1 \
19- && cd /usr/src/mysql \
20- && cmake . -DCMAKE_BUILD_TYPE=Release \
21- -DWITH_EMBEDDED_SERVER=OFF \
22- && make -j"$(nproc)" \
23- && make test \
24- && make install \
25- && cd .. \
26- && rm -rf mysql \
27- && rm -rf /usr/local/mysql/mysql-test \
28- && rm -rf /usr/local/mysql/sql-bench \
22+ # 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?
23+ RUN apt-get update && apt-get install -y curl --no-install-recommends && rm -rf /var/lib/apt/lists/* \
24+ && 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 \
25+ && 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 \
26+ && apt-get purge -y --auto-remove curl \
27+ && gpg --verify mysql.tar.gz.asc \
28+ && mkdir /usr/local/mysql \
29+ && tar -xzf mysql.tar.gz -C /usr/local/mysql --strip-components=1 \
30+ && rm mysql.tar.gz* \
31+ && rm -rf /usr/local/mysql/mysql-test /usr/local/mysql/sql-bench \
32+ && rm -rf /usr/local/mysql/bin/*-debug /usr/local/mysql/bin/*_embedded \
2933 && find /usr/local/mysql -type f -name "*.a" -delete \
30- && { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; }
34+ && apt-get update && apt-get install -y binutils && rm -rf /var/lib/apt/lists/* \
35+ && { find /usr/local/mysql -type f -executable -exec strip --strip-all '{}' + || true; } \
36+ && apt-get purge -y --auto-remove binutils
3137ENV PATH $PATH:/usr/local/mysql/bin:/usr/local/mysql/scripts
3238
3339WORKDIR /usr/local/mysql
0 commit comments