File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed
Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf
1616RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1717
1818ENV MYSQL_MAJOR 5.6
19- ENV MYSQL_VERSION 5.6.27
19+ ENV MYSQL_VERSION 5.6.27-1debian8
2020
2121RUN echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
2222
@@ -28,7 +28,7 @@ RUN { \
2828 echo mysql-community-server mysql-community-server/re-root-pass password '' ; \
2929 echo mysql-community-server mysql-community-server/remove-test-db select false; \
3030 } | debconf-set-selections \
31- && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" * && rm -rf /var/lib/apt/lists/* \
31+ && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* \
3232 && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql
3333
3434# comment out a few problematic configuration values
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ RUN apt-get update && apt-get install -y perl --no-install-recommends && rm -rf
1616RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
1717
1818ENV MYSQL_MAJOR 5.7
19- ENV MYSQL_VERSION 5.7.9
19+ ENV MYSQL_VERSION 5.7.9-1debian8
2020
21- RUN echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-${MYSQL_MAJOR}-dmr " > /etc/apt/sources.list.d/mysql.list
21+ RUN echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
2222
2323# 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)
2424# also, we set debconf keys to make APT a little quieter
@@ -28,7 +28,7 @@ RUN { \
2828 echo mysql-community-server mysql-community-server/re-root-pass password '' ; \
2929 echo mysql-community-server mysql-community-server/remove-test-db select false; \
3030 } | debconf-set-selections \
31- && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" * && rm -rf /var/lib/apt/lists/* \
31+ && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* \
3232 && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql
3333
3434# comment out a few problematic configuration values
Original file line number Diff line number Diff line change 1717for version in " ${versions[@]} " ; do
1818 commit=" $( cd " $version " && git log -1 --format=' format:%H' -- Dockerfile $( awk ' toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile) ) "
1919 fullVersion=" $( grep -m1 ' ENV MYSQL_VERSION ' " $version /Dockerfile" | cut -d' ' -f3) "
20+ fullVersion=" ${fullVersion% -* } " # remove "debian version" suffix
2021 versionAliases=()
2122 while [ " $fullVersion " != " $version " -a " ${fullVersion% [.-]* } " != " $fullVersion " ]; do
2223 versionAliases+=( $fullVersion )
Original file line number Diff line number Diff line change 1010versions=( " ${versions[@]%/ } " )
1111
1212for version in " ${versions[@]} " ; do
13- fullVersion=" $( curl -sSL " https://dev.mysql.com/downloads/mysql/$version .html?os=2" \
14- | grep ' ">(mysql-' " $version " ' .*-linux.*-x86_64\.tar\.gz)<' \
15- | sed -r ' s!.*\(mysql-([^<)]+)-linux.*-x86_64\.tar\.gz\).*!\1!' \
16- | sort -V | tail -1) "
13+ if [ " $version " = ' 5.5' ]; then
14+ fullVersion=" $( curl -sSL " https://dev.mysql.com/downloads/mysql/$version .html?os=2" \
15+ | grep ' ">(mysql-' " $version " ' .*-linux.*-x86_64\.tar\.gz)<' \
16+ | sed -r ' s!.*\(mysql-([^<)]+)-linux.*-x86_64\.tar\.gz\).*!\1!' \
17+ | sort -V | tail -1) "
18+ else
19+ fullVersion=" $( curl -fsSL " http://repo.mysql.com/apt/debian/dists/jessie/mysql-$version /binary-amd64/Packages.gz" | gunzip | awk -F ' : ' ' $1 == "Package" { pkg = $2; next } pkg == "mysql-server" && $1 == "Version" { print $2 }' ) "
20+ fi
1721
1822 (
1923 set -x
You can’t perform that action at this time.
0 commit comments