diff --git a/Dockerfile b/Dockerfile index e6c4736..df32ded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG PHP_VERSION=7.4 ARG WP_VERSION=5.8.0 -FROM wordpress:${WP_VERSION}-php${PHP_VERSION}-fpm-alpine AS wordpress-builder +FROM --platform=${TARGETPLATFORM} wordpress:${WP_VERSION}-php${PHP_VERSION}-fpm-alpine AS wordpress-builder USER root @@ -14,7 +14,7 @@ RUN mkdir -p usr/local/bin \ ################################################# APP ################################################################## -FROM nlss/php-nginx:${PHP_VERSION} +FROM --platform=${TARGETPLATFORM} nlss/php-nginx:${PHP_VERSION} ARG WP_VERSION ENV APK_DEPS "zlib-dev libzip-dev libpng-dev icu-dev imagemagick-dev patch" ENV APK_BUILD_DEPS "curl-dev autoconf alpine-sdk" diff --git a/build/bin/build b/build/bin/build index c74b866..964b510 100755 --- a/build/bin/build +++ b/build/bin/build @@ -7,5 +7,5 @@ if [ -z "${WP_VERSION}" ]; then exit 1 fi -docker build --build-arg WP_VERSION=${WP_VERSION} --tag "nlss/wordpress:${WP_VERSION}" --tag "nlss/wordpress:latest" . -docker push --all-tags nlss/wordpress \ No newline at end of file +docker buildx create --use --name build --node build --driver-opt network=host +docker buildx build --pull --push --platform "linux/amd64,linux/armhf,linux/aarch64" --build-arg "WP_VERSION=${WP_VERSION}" --tag "nlss/wordpress:${WP_VERSION}" --tag "nlss/wordpress:latest" . \ No newline at end of file