Add multi-arch support

This commit is contained in:
xZero707 2021-09-22 19:17:20 +02:00
parent be1b046e1b
commit af806f4218
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
ARG PHP_VERSION=7.4 ARG PHP_VERSION=7.4
ARG WP_VERSION=5.8.0 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 USER root
@ -14,7 +14,7 @@ RUN mkdir -p usr/local/bin \
################################################# APP ################################################################## ################################################# APP ##################################################################
FROM nlss/php-nginx:${PHP_VERSION} FROM --platform=${TARGETPLATFORM} nlss/php-nginx:${PHP_VERSION}
ARG WP_VERSION ARG WP_VERSION
ENV APK_DEPS "zlib-dev libzip-dev libpng-dev icu-dev imagemagick-dev patch" ENV APK_DEPS "zlib-dev libzip-dev libpng-dev icu-dev imagemagick-dev patch"
ENV APK_BUILD_DEPS "curl-dev autoconf alpine-sdk" ENV APK_BUILD_DEPS "curl-dev autoconf alpine-sdk"

View File

@ -7,5 +7,5 @@ if [ -z "${WP_VERSION}" ]; then
exit 1 exit 1
fi fi
docker build --build-arg WP_VERSION=${WP_VERSION} --tag "nlss/wordpress:${WP_VERSION}" --tag "nlss/wordpress:latest" . docker buildx create --use --name build --node build --driver-opt network=host
docker push --all-tags nlss/wordpress 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" .