Skip to content

Commit 51c2b91

Browse files
committed
MDEV-31529: MariaDB docker pipeline is failing
s390x database initialization was slow (thanks @tianon). We don't use it, so fake its existance so debian install scripts don't consume the intensive part of the installation. [1] docker-library/official-images#14923
1 parent f353d3d commit 51c2b91

File tree

10 files changed

+20
-0
lines changed

10 files changed

+20
-0
lines changed

10.10/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

10.11/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

10.4/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ RUN set -ex; \
109109
echo "mariadb-server-$MARIADB_MAJOR" mysql-server/root_password_again password 'unused'; \
110110
} | debconf-set-selections; \
111111
apt-get update; \
112+
# postinst script creates a datadir, so avoid creating it by faking its existance.
113+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
112114
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
113115
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
114116
; \

10.5/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ RUN set -ex; \
109109
echo "mariadb-server-$MARIADB_MAJOR" mysql-server/root_password_again password 'unused'; \
110110
} | debconf-set-selections; \
111111
apt-get update; \
112+
# postinst script creates a datadir, so avoid creating it by faking its existance.
113+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
112114
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
113115
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
114116
; \

10.6/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ RUN set -ex; \
109109
echo "mariadb-server-$MARIADB_MAJOR" mysql-server/root_password_again password 'unused'; \
110110
} | debconf-set-selections; \
111111
apt-get update; \
112+
# postinst script creates a datadir, so avoid creating it by faking its existance.
113+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
112114
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
113115
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
114116
; \

10.9/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

11.0/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

11.1/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

11.2/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ RUN set -ex; \
107107
echo "mariadb-server" mysql-server/root_password_again password 'unused'; \
108108
} | debconf-set-selections; \
109109
apt-get update; \
110+
# postinst script creates a datadir, so avoid creating it by faking its existance.
111+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
110112
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
111113
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
112114
; \

Dockerfile.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ RUN set -ex; \
109109
echo "mariadb-server-$MARIADB_MAJOR" mysql-server/root_password_again password 'unused'; \
110110
} | debconf-set-selections; \
111111
apt-get update; \
112+
# postinst script creates a datadir, so avoid creating it by faking its existance.
113+
mkdir -p /var/lib/mysql/mysql ; touch /var/lib/mysql/mysql/user.frm ; \
112114
# mariadb-backup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
113115
apt-get install -y --no-install-recommends mariadb-server="$MARIADB_VERSION" mariadb-backup socat \
114116
; \

0 commit comments

Comments
 (0)