diff --git a/1.15/alpine3.13/Dockerfile b/1.15/alpine3.13/Dockerfile index 61dcb19d..1c7bafd1 100644 --- a/1.15/alpine3.13/Dockerfile +++ b/1.15/alpine3.13/Dockerfile @@ -76,17 +76,7 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ -# https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) - GO386= ./bootstrap.bash; \ - export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ - "$GOROOT_BOOTSTRAP/bin/go" version; \ - fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ - rm -rf "$GOROOT_BOOTSTRAP"; \ - fi; \ ); \ \ # pre-compile the standard library, just like the official binary release tarballs do diff --git a/1.15/alpine3.12/Dockerfile b/1.15/alpine3.14/Dockerfile similarity index 93% rename from 1.15/alpine3.12/Dockerfile rename to 1.15/alpine3.14/Dockerfile index bd759ca6..a37f45c5 100644 --- a/1.15/alpine3.12/Dockerfile +++ b/1.15/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN apk add --no-cache \ ca-certificates @@ -76,15 +76,17 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ # https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) +# Go 1.15 + Alpine 3.14 == Go 1.16 bootstrap +# Go 1.16 + Alpine 3.13 == Go 1.15 bootstrap +# (once Go 1.15 *and* Alpine 3.13 go away, we can remove this) GO386= ./bootstrap.bash; \ export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ "$GOROOT_BOOTSTRAP/bin/go" version; \ fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ rm -rf "$GOROOT_BOOTSTRAP"; \ fi; \ ); \ diff --git a/1.16/alpine3.13/Dockerfile b/1.16/alpine3.13/Dockerfile index de2b390a..92d1b9e0 100644 --- a/1.16/alpine3.13/Dockerfile +++ b/1.16/alpine3.13/Dockerfile @@ -76,15 +76,17 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ # https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) +# Go 1.15 + Alpine 3.14 == Go 1.16 bootstrap +# Go 1.16 + Alpine 3.13 == Go 1.15 bootstrap +# (once Go 1.15 *and* Alpine 3.13 go away, we can remove this) GO386= ./bootstrap.bash; \ export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ "$GOROOT_BOOTSTRAP/bin/go" version; \ fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ rm -rf "$GOROOT_BOOTSTRAP"; \ fi; \ ); \ diff --git a/1.16/alpine3.12/Dockerfile b/1.16/alpine3.14/Dockerfile similarity index 86% rename from 1.16/alpine3.12/Dockerfile rename to 1.16/alpine3.14/Dockerfile index d5d0ffdc..7e5b58a7 100644 --- a/1.16/alpine3.12/Dockerfile +++ b/1.16/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN apk add --no-cache \ ca-certificates @@ -76,17 +76,7 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ -# https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) - GO386= ./bootstrap.bash; \ - export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ - "$GOROOT_BOOTSTRAP/bin/go" version; \ - fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ - rm -rf "$GOROOT_BOOTSTRAP"; \ - fi; \ ); \ \ # pre-compile the standard library, just like the official binary release tarballs do diff --git a/1.17-rc/alpine3.13/Dockerfile b/1.17-rc/alpine3.13/Dockerfile index 07ef8a94..63ab1104 100644 --- a/1.17-rc/alpine3.13/Dockerfile +++ b/1.17-rc/alpine3.13/Dockerfile @@ -76,15 +76,17 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ # https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) +# Go 1.15 + Alpine 3.14 == Go 1.16 bootstrap +# Go 1.16 + Alpine 3.13 == Go 1.15 bootstrap +# (once Go 1.15 *and* Alpine 3.13 go away, we can remove this) GO386= ./bootstrap.bash; \ export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ "$GOROOT_BOOTSTRAP/bin/go" version; \ fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ + if [ -n "${GO386:-}" ]; then \ rm -rf "$GOROOT_BOOTSTRAP"; \ fi; \ ); \ diff --git a/1.17-rc/alpine3.12/Dockerfile b/1.17-rc/alpine3.14/Dockerfile similarity index 86% rename from 1.17-rc/alpine3.12/Dockerfile rename to 1.17-rc/alpine3.14/Dockerfile index 49044d59..562f60ef 100644 --- a/1.17-rc/alpine3.12/Dockerfile +++ b/1.17-rc/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN apk add --no-cache \ ca-certificates @@ -76,17 +76,7 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ -# https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) - GO386= ./bootstrap.bash; \ - export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ - "$GOROOT_BOOTSTRAP/bin/go" version; \ - fi; \ ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ - rm -rf "$GOROOT_BOOTSTRAP"; \ - fi; \ ); \ \ # pre-compile the standard library, just like the official binary release tarballs do diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index b3fbf896..95895861 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -1,4 +1,5 @@ -FROM alpine:{{ env.variant | ltrimstr("alpine") }} +{{ def alpine_version: env.variant | ltrimstr("alpine") -}} +FROM alpine:{{ alpine_version }} RUN apk add --no-cache \ ca-certificates @@ -76,17 +77,28 @@ RUN set -eux; \ cd /usr/local/go/src; \ # set GOROOT_BOOTSTRAP + GOHOST* such that we can build Go successfully export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ +{{ + def need_386_hack: + (env.version == "1.15" and alpine_version != "3.13") + or (env.version != "1.15" and alpine_version == "3.13") +-}} +{{ if need_386_hack then ( -}} + if [ -n "${GO386:-}" ]; then \ # https://github.com/docker-library/golang/issues/359 -> https://github.com/golang/go/issues/44500 -# (once our Alpine base has Go 1.16, we can remove this hack) +# Go 1.15 + Alpine 3.14 == Go 1.16 bootstrap +# Go 1.16 + Alpine 3.13 == Go 1.15 bootstrap +# (once Go 1.15 *and* Alpine 3.13 go away, we can remove this) GO386= ./bootstrap.bash; \ export GOROOT_BOOTSTRAP="/usr/local/go-$GOOS-$GOARCH-bootstrap"; \ "$GOROOT_BOOTSTRAP/bin/go" version; \ fi; \ +{{ ) else "" end -}} ./make.bash; \ - if [ "${GO386:-}" = 'softfloat' ]; then \ +{{ if need_386_hack then ( -}} + if [ -n "${GO386:-}" ]; then \ rm -rf "$GOROOT_BOOTSTRAP"; \ fi; \ +{{ ) else "" end -}} ); \ \ # pre-compile the standard library, just like the official binary release tarballs do diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 6ca13aab..a285a289 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -10,7 +10,7 @@ defaultDebianSuite='buster' declare -A debianSuite=( #[1.13-rc]='buster' ) -defaultAlpineVersion='3.13' +defaultAlpineVersion='3.14' declare -A alpineVersion=( #[1.9]='3.7' ) diff --git a/versions.json b/versions.json index af78f074..11aa77b2 100644 --- a/versions.json +++ b/versions.json @@ -136,8 +136,8 @@ "variants": [ "buster", "stretch", + "alpine3.14", "alpine3.13", - "alpine3.12", "windows/windowsservercore-1809", "windows/windowsservercore-ltsc2016", "windows/nanoserver-1809" @@ -290,8 +290,8 @@ "variants": [ "buster", "stretch", + "alpine3.14", "alpine3.13", - "alpine3.12", "windows/windowsservercore-1809", "windows/windowsservercore-ltsc2016", "windows/nanoserver-1809" @@ -453,8 +453,8 @@ "variants": [ "buster", "stretch", + "alpine3.14", "alpine3.13", - "alpine3.12", "windows/windowsservercore-1809", "windows/windowsservercore-ltsc2016", "windows/nanoserver-1809" diff --git a/versions.sh b/versions.sh index 76912fe4..c5151494 100755 --- a/versions.sh +++ b/versions.sh @@ -131,8 +131,8 @@ for version in "${versions[@]}"; do "buster", "stretch", ( - "3.13", - "3.12" + "3.14", + "3.13" | "alpine" + .), if .arches | has("windows-amd64") then (