diff --git a/1.18/alpine3.14/Dockerfile b/1.18/alpine3.14/Dockerfile index 5537ac90..e941bb21 100644 --- a/1.18/alpine3.14/Dockerfile +++ b/1.18/alpine3.14/Dockerfile @@ -78,6 +78,14 @@ RUN set -eux; \ go \ musl-dev \ ; \ + if [ "$GOARCH" = 'ppc64le' ]; then \ +# https://github.com/golang/go/issues/51787 + wget -O ppc64le-alpine.patch 'https://github.com/golang/go/commit/946167906ed8646c433c257b074a10e01f0a7dab.patch'; \ + apk add --no-cache --virtual .build-patch patch; \ + patch --strip=1 --input="$PWD/ppc64le-alpine.patch" --directory=/usr/local/go; \ + apk del --no-network .build-patch; \ + rm ppc64le-alpine.patch; \ + fi; \ \ ( \ cd /usr/local/go/src; \ diff --git a/1.18/alpine3.15/Dockerfile b/1.18/alpine3.15/Dockerfile index 3e98d61d..3b48e011 100644 --- a/1.18/alpine3.15/Dockerfile +++ b/1.18/alpine3.15/Dockerfile @@ -78,6 +78,14 @@ RUN set -eux; \ go \ musl-dev \ ; \ + if [ "$GOARCH" = 'ppc64le' ]; then \ +# https://github.com/golang/go/issues/51787 + wget -O ppc64le-alpine.patch 'https://github.com/golang/go/commit/946167906ed8646c433c257b074a10e01f0a7dab.patch'; \ + apk add --no-cache --virtual .build-patch patch; \ + patch --strip=1 --input="$PWD/ppc64le-alpine.patch" --directory=/usr/local/go; \ + apk del --no-network .build-patch; \ + rm ppc64le-alpine.patch; \ + fi; \ \ ( \ cd /usr/local/go/src; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 38852eed..96dfb626 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -134,6 +134,16 @@ RUN set -eux; \ go \ musl-dev \ ; \ +{{ if env.version == "1.18" then ( -}} + if [ "$GOARCH" = 'ppc64le' ]; then \ +# https://github.com/golang/go/issues/51787 + wget -O ppc64le-alpine.patch 'https://github.com/golang/go/commit/946167906ed8646c433c257b074a10e01f0a7dab.patch'; \ + apk add --no-cache --virtual .build-patch patch; \ + patch --strip=1 --input="$PWD/ppc64le-alpine.patch" --directory=/usr/local/go; \ + apk del --no-network .build-patch; \ + rm ppc64le-alpine.patch; \ + fi; \ +{{ ) else "" end -}} {{ ) else ( -}} savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \