diff --git a/Dockerfile b/Dockerfile index 0aaf65f..72e804c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,17 @@ FROM php:5.6-apache # Install the mysqli extension RUN docker-php-ext-install mysqli -# Update repo -RUN apt-get update -y - -# Install mysql-client -RUN apt-get install mysql-client -y +# Update package sources for the archived Debian Stretch base image and +# install the CLI tools needed during the image build. +RUN set -eux; \ + printf '%s\n' \ + 'deb [trusted=yes] http://archive.debian.org/debian stretch main' \ + 'deb [trusted=yes] http://archive.debian.org/debian-security stretch/updates main' \ + > /etc/apt/sources.list; \ + printf 'Acquire::Check-Valid-Until "false";\n' > /etc/apt/apt.conf.d/99archive; \ + apt-get update -o Acquire::Check-Valid-Until=false; \ + apt-get install -y --no-install-recommends curl default-mysql-client; \ + rm -rf /var/lib/apt/lists/* # Install wp-cli as wp RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \ diff --git a/docker-compose.yml b/docker-compose.yml index 394a9ee..2865636 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3.1' - services: db: + # MySQL 5.7 is pulled as amd64 on Apple Silicon, so make that explicit. + platform: linux/amd64 # mysql/mysql-server is less in size than mysql image: mysql/mysql-server:5.7 restart: always