Skip to content

Commit 9854975

Browse files
author
Piotr Obrzut
committed
Updated image base to OL8
Change-Id: I3b26cd8a8d0385d9000089af2a817f5bc5c9d6ff
1 parent 9831891 commit 9854975

File tree

5 files changed

+47
-20
lines changed

5 files changed

+47
-20
lines changed

5.6/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
# You should have received a copy of the GNU General Public License
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15-
FROM oraclelinux:7-slim
15+
FROM oraclelinux:8-slim
1616

1717
ARG MYSQL_SERVER_PACKAGE=mysql-community-server-minimal-5.6.46
1818
ARG MYSQL_SHELL_PACKAGE=
1919

2020
# Install server
21-
RUN yum install -y https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
21+
RUN microdnf update && echo "[main]" > /etc/dnf/dnf.conf \
22+
&& dnf module disable -y mysql \
23+
&& dnf install -y yum-utils https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
2224
https://repo.mysql.com/mysql-community-release-el7.rpm \
23-
&& yum-config-manager --enable mysql56-server-minimal \
24-
&& yum install -y \
25+
&& dnf config-manager --enable mysql56-server-minimal \
26+
&& dnf install -y \
2527
$MYSQL_SERVER_PACKAGE \
2628
$MYSQL_SHELL_PACKAGE \
2729
libpwquality \
28-
&& yum clean all \
30+
# password generation
31+
cracklib-dicts \
32+
perl-Getopt-Long \
33+
&& dnf clean all \
2934
&& mkdir /docker-entrypoint-initdb.d
3035

3136
VOLUME /var/lib/mysql

5.7/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
# You should have received a copy of the GNU General Public License
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15-
FROM oraclelinux:7-slim
15+
FROM oraclelinux:8-slim
1616

1717
ARG MYSQL_SERVER_PACKAGE=mysql-community-server-minimal-5.7.28
1818
ARG MYSQL_SHELL_PACKAGE=mysql-shell-8.0.18
1919

2020
# Install server
21-
RUN yum install -y https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
21+
RUN microdnf update && echo "[main]" > /etc/dnf/dnf.conf \
22+
&& dnf module disable -y mysql \
23+
&& dnf install -y yum-utils https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
2224
https://repo.mysql.com/mysql-community-release-el7.rpm \
23-
&& yum-config-manager --enable mysql57-server-minimal \
24-
&& yum install -y \
25+
&& dnf config-manager --enable mysql57-server-minimal \
26+
&& dnf install -y \
2527
$MYSQL_SERVER_PACKAGE \
2628
$MYSQL_SHELL_PACKAGE \
2729
libpwquality \
28-
&& yum clean all \
30+
# password generation
31+
cracklib-dicts \
32+
\
33+
&& dnf clean all \
2934
&& mkdir /docker-entrypoint-initdb.d
3035

3136
VOLUME /var/lib/mysql

8.0/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
# You should have received a copy of the GNU General Public License
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15-
FROM oraclelinux:7-slim
15+
FROM oraclelinux:8-slim
1616

1717
ARG MYSQL_SERVER_PACKAGE=mysql-community-server-minimal-8.0.18
1818
ARG MYSQL_SHELL_PACKAGE=mysql-shell-8.0.18
1919

2020
# Install server
21-
RUN yum install -y https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
21+
RUN microdnf update && echo "[main]" > /etc/dnf/dnf.conf \
22+
&& dnf module disable -y mysql \
23+
&& dnf install -y yum-utils https://repo.mysql.com/mysql-community-minimal-release-el7.rpm \
2224
https://repo.mysql.com/mysql-community-release-el7.rpm \
23-
&& yum-config-manager --enable mysql80-server-minimal \
24-
&& yum install -y \
25+
&& dnf config-manager --enable mysql80-server-minimal \
26+
&& dnf install -y \
2527
$MYSQL_SERVER_PACKAGE \
2628
$MYSQL_SHELL_PACKAGE \
2729
libpwquality \
28-
&& yum clean all \
30+
# password generation
31+
cracklib-dicts \
32+
\
33+
&& dnf clean all \
2934
&& mkdir /docker-entrypoint-initdb.d
3035

3136
VOLUME /var/lib/mysql

gen_dockerfiles.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ STARTUP_WAIT["5.6"]="\"yes\""
5656
STARTUP_WAIT["5.7"]="\"\""
5757
STARTUP_WAIT["8.0"]="\"\""
5858

59+
declare -A EXTRA_DEPENDENCIES
60+
EXTRA_DEPENDENCIES["5.5"]=""
61+
EXTRA_DEPENDENCIES["5.6"]="perl-Getopt-Long"
62+
EXTRA_DEPENDENCIES["5.7"]=""
63+
EXTRA_DEPENDENCIES["8.0"]=""
64+
5965
# The option to set a user as expired, (forcing a password change before
6066
# any other action can be taken) was added in 5.6
6167
declare -A EXPIRE_SUPPORT
@@ -93,6 +99,7 @@ do
9399
sed -i 's#%%REPO%%#'"${REPO}"'#g' tmpfile
94100
REPO_VERSION=${VERSION//\./}
95101
sed -i 's#%%REPO_VERSION%%#'"${REPO_VERSION}"'#g' tmpfile
102+
sed -i 's#%%EXTRA_DEPENDENCIES%%#'"${EXTRA_DEPENDENCIES[${VERSION}]}"'#g' tmpfile
96103

97104
if [[ ! -z ${MYSQL_SHELL_VERSIONS[${VERSION}]} ]]; then
98105
sed -i 's#%%MYSQL_SHELL_PACKAGE%%#'"mysql-shell-${MYSQL_SHELL_VERSIONS[${VERSION}]}"'#g' tmpfile

template/Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
# You should have received a copy of the GNU General Public License
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15-
FROM oraclelinux:7-slim
15+
FROM oraclelinux:8-slim
1616

1717
ARG MYSQL_SERVER_PACKAGE=%%MYSQL_SERVER_PACKAGE%%
1818
ARG MYSQL_SHELL_PACKAGE=%%MYSQL_SHELL_PACKAGE%%
1919

2020
# Install server
21-
RUN yum install -y %%REPO%%/mysql-community-minimal-release-el7.rpm \
21+
RUN microdnf update && echo "[main]" > /etc/dnf/dnf.conf \
22+
&& dnf module disable -y mysql \
23+
&& dnf install -y yum-utils %%REPO%%/mysql-community-minimal-release-el7.rpm \
2224
%%REPO%%/mysql-community-release-el7.rpm \
23-
&& yum-config-manager --enable mysql%%REPO_VERSION%%-server-minimal \
24-
&& yum install -y \
25+
&& dnf config-manager --enable mysql%%REPO_VERSION%%-server-minimal \
26+
&& dnf install -y \
2527
$MYSQL_SERVER_PACKAGE \
2628
$MYSQL_SHELL_PACKAGE \
2729
libpwquality \
28-
&& yum clean all \
30+
# password generation
31+
cracklib-dicts \
32+
%%EXTRA_DEPENDENCIES%% \
33+
&& dnf clean all \
2934
&& mkdir /docker-entrypoint-initdb.d
3035

3136
VOLUME /var/lib/mysql

0 commit comments

Comments
 (0)