From c6565bf7968a5a0561df75640b83d97c789eeb3c Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 6 Mar 2022 13:53:24 +0100 Subject: [PATCH 1/2] Add arm64 for MySQL 8.0 --- .github/workflows/params.yml | 7 ++++++- Dockerfiles/mysql-8.0 | 21 +++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/params.yml b/.github/workflows/params.yml index f821d02..c9172a1 100644 --- a/.github/workflows/params.yml +++ b/.github/workflows/params.yml @@ -15,9 +15,14 @@ env: [ { "NAME": "mysql", - "VERSION": ["5.5", "5.6", "5.7", "8.0"], + "VERSION": ["5.5", "5.6", "5.7"], "ARCH": ["linux/amd64"] }, + { + "NAME": "mysql", + "VERSION": ["8.0"], + "ARCH": ["linux/amd64", "linux/arm64"] + }, { "NAME": "mariadb", "VERSION": ["5.5", "10.0"], diff --git a/Dockerfiles/mysql-8.0 b/Dockerfiles/mysql-8.0 index 038abf2..b63aa9a 100644 --- a/Dockerfiles/mysql-8.0 +++ b/Dockerfiles/mysql-8.0 @@ -1,7 +1,8 @@ # vi: ft=dockerfile -FROM mysql:8.0 +FROM mysql:8.0-oracle RUN set -eux \ +# Set Additional config directories && mkdir -p /etc/mysql/docker-default.d/ \ && if [ -f /etc/my.cnf ]; then \ echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/my.cnf; \ @@ -11,13 +12,25 @@ RUN set -eux \ echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \ false; \ fi \ + \ # Allow native password handling for MySQL 8.0 - && sed -i'' 's/^\[mysqld\]/[mysqld]\ndefault-authentication-plugin=mysql_native_password/g' /etc/mysql/my.cnf \ + && if [ -f /etc/my.cnf ]; then \ + sed -i'' 's/^\[mysqld\]/[mysqld]\ndefault-authentication-plugin=mysql_native_password/g' /etc/my.cnf; \ + elif [ -f /etc/mysql/my.cnf ]; then \ + sed -i'' 's/^\[mysqld\]/[mysqld]\ndefault-authentication-plugin=mysql_native_password/g' /etc/mysql/my.cnf; \ + else \ + echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \ + false; \ + fi \ + \ +# Set Docker Entrypoint && if [ -f "/entrypoint.sh" ]; then \ mv "/entrypoint.sh" "/docker-entrypoint.sh"; \ - fi \ - && if [ ! -f "/docker-entrypoint.sh" ]; then \ + elif [ -f "/usr/local/bin/docker-entrypoint.sh" ]; then \ ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \ + else \ + echo "/entrypoint.sh and /usr/local/bin/docker-entrypoint.sh are not available"; \ + false; \ fi \ && chmod +x "/docker-entrypoint.sh" From b359198b43df71267ae0d5429e048348489facbc Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 6 Mar 2022 14:00:55 +0100 Subject: [PATCH 2/2] Pull correct platform image --- tests/02-mysqli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/02-mysqli.sh b/tests/02-mysqli.sh index 0fe8e36..766d465 100755 --- a/tests/02-mysqli.sh +++ b/tests/02-mysqli.sh @@ -21,7 +21,7 @@ run "docker run -d --rm --platform ${ARCH} $(tty -s && echo "-it" || echo) --hos # Pull PHP image echo "2/5 Pulling PHP image " -while ! run "docker pull php:7.2"; do +while ! run "docker pull --platform ${ARCH} php:7.2"; do sleep 1 done