diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd5770e1..61ffb56e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,6 @@ jobs: name: Generate Jobs run: | strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" - strategy="$(.github/workflows/munge.sh -c <<<"$strategy")" - strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")" EOF="EOF-$RANDOM-$RANDOM-$RANDOM" echo "strategy<<$EOF" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/munge.sh b/.github/workflows/munge.sh deleted file mode 100755 index c03a9a7a..00000000 --- a/.github/workflows/munge.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -# we use this to munge "versions.json" to force building on all arches -versionsMunge='.[].arches |= with_entries(if .key != "src" then del(.value.url, .value.sha256) else . end)' -export versionsMunge - -jq ' - .matrix.include += [ - .matrix.include[] - | select(.name | test(" (.+)") | not) # ignore any existing munged builds - | select(.os | startswith("windows-") | not) # ignore Windows (always downloads) - | select(any(.meta.entries[].tags[]; contains("golang:1.20"))) # https://github.com/docker-library/golang/pull/500#issuecomment-1863578601 - | .name += " (force build)" - | .runs.build = ([ - "# update versions.json to force us to build Go instead of downloading it", - "jq " + (env.versionsMunge | @sh) + " versions.json | tee versions.munged.json", - "mv versions.munged.json versions.json", - "./apply-templates.sh", - "git diff", - .runs.build - ] | join("\n")) - ] -' "$@" diff --git a/1.20/alpine3.18/Dockerfile b/1.20/alpine3.18/Dockerfile deleted file mode 100644 index a7cea5bb..00000000 --- a/1.20/alpine3.18/Dockerfile +++ /dev/null @@ -1,141 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.18 AS build - -ENV PATH /usr/local/go/bin:$PATH - -ENV GOLANG_VERSION 1.20.14 - -RUN set -eux; \ - apk add --no-cache --virtual .fetch-deps \ - ca-certificates \ - gnupg \ -# busybox's "tar" doesn't handle directory mtime correctly, so our SOURCE_DATE_EPOCH lookup doesn't work (the mtime of "/usr/local/go" always ends up being the extraction timestamp) - tar \ - ; \ - arch="$(apk --print-arch)"; \ - url=; \ - case "$arch" in \ - 'x86_64') \ - export GOAMD64='v1' GOARCH='amd64' GOOS='linux'; \ - ;; \ - 'armhf') \ - export GOARCH='arm' GOARM='6' GOOS='linux'; \ - ;; \ - 'armv7') \ - export GOARCH='arm' GOARM='7' GOOS='linux'; \ - ;; \ - 'aarch64') \ - export GOARCH='arm64' GOOS='linux'; \ - ;; \ - 'x86') \ - export GO386='softfloat' GOARCH='386' GOOS='linux'; \ - ;; \ - 'ppc64le') \ - export GOARCH='ppc64le' GOOS='linux'; \ - ;; \ - 'riscv64') \ - export GOARCH='riscv64' GOOS='linux'; \ - ;; \ - 's390x') \ - export GOARCH='s390x' GOOS='linux'; \ - ;; \ - *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ - esac; \ - build=; \ - if [ -z "$url" ]; then \ -# https://github.com/golang/go/issues/38536#issuecomment-616897960 - build=1; \ - url='https://dl.google.com/go/go1.20.14.src.tar.gz'; \ - sha256='1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e'; \ -# the precompiled binaries published by Go upstream were not compatible with Alpine in Go 1.20, so we always build from source here 😅 - fi; \ - \ - wget -O go.tgz.asc "$url.asc"; \ - wget -O go.tgz "$url"; \ - echo "$sha256 *go.tgz" | sha256sum -c -; \ - \ -# https://github.com/golang/go/issues/14739#issuecomment-324767697 - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ -# https://www.google.com/linuxrepositories/ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ -# let's also fetch the specific subkey of that key explicitly that we expect "go.tgz.asc" to be signed by, just to make sure we definitely have it - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; \ - gpg --batch --verify go.tgz.asc go.tgz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" go.tgz.asc; \ - \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ -# save the timestamp from the tarball so we can restore it for reproducibility, if necessary (see below) - SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/local/go)"; \ - export SOURCE_DATE_EPOCH; \ -# for logging validation/edification - date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ - \ - if [ -n "$build" ]; then \ - apk add --no-cache --virtual .build-deps \ - bash \ - gcc \ - go \ - musl-dev \ - ; \ - \ - export GOCACHE='/tmp/gocache'; \ - \ - ( \ - 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 [ "${GOARCH:-}" = '386' ]; then \ -# https://github.com/golang/go/issues/52919; https://github.com/docker-library/golang/pull/426#issuecomment-1152623837 - export CGO_CFLAGS='-fno-stack-protector'; \ - fi; \ - ./make.bash; \ - ); \ - \ - apk del --no-network .build-deps; \ - \ -# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain - rm -rf \ - /usr/local/go/pkg/*/cmd \ - /usr/local/go/pkg/bootstrap \ - /usr/local/go/pkg/obj \ - /usr/local/go/pkg/tool/*/api \ - /usr/local/go/pkg/tool/*/go_bootstrap \ - /usr/local/go/src/cmd/dist/dist \ - "$GOCACHE" \ - ; \ - \ -# clamp timestamps for reproducibility (allows "COPY --link" to be more clever/useful) - date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ - touch -t "$date" /usr/local/.go-date-stamp; \ - find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ - rm /usr/local/.go-date-stamp; \ - touch -t "$date" /usr/local; \ - fi; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - go version; \ -# make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) - epoch="$(stat -c '%Y' /usr/local/go)"; \ - [ "$SOURCE_DATE_EPOCH" = "$epoch" ] - -FROM alpine:3.18 - -RUN apk add --no-cache ca-certificates - -ENV GOLANG_VERSION 1.20.14 - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -COPY --from=build --link /usr/local/go/ /usr/local/go/ -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" -WORKDIR $GOPATH diff --git a/1.20/alpine3.19/Dockerfile b/1.20/alpine3.19/Dockerfile deleted file mode 100644 index a78cbf06..00000000 --- a/1.20/alpine3.19/Dockerfile +++ /dev/null @@ -1,141 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.19 AS build - -ENV PATH /usr/local/go/bin:$PATH - -ENV GOLANG_VERSION 1.20.14 - -RUN set -eux; \ - apk add --no-cache --virtual .fetch-deps \ - ca-certificates \ - gnupg \ -# busybox's "tar" doesn't handle directory mtime correctly, so our SOURCE_DATE_EPOCH lookup doesn't work (the mtime of "/usr/local/go" always ends up being the extraction timestamp) - tar \ - ; \ - arch="$(apk --print-arch)"; \ - url=; \ - case "$arch" in \ - 'x86_64') \ - export GOAMD64='v1' GOARCH='amd64' GOOS='linux'; \ - ;; \ - 'armhf') \ - export GOARCH='arm' GOARM='6' GOOS='linux'; \ - ;; \ - 'armv7') \ - export GOARCH='arm' GOARM='7' GOOS='linux'; \ - ;; \ - 'aarch64') \ - export GOARCH='arm64' GOOS='linux'; \ - ;; \ - 'x86') \ - export GO386='softfloat' GOARCH='386' GOOS='linux'; \ - ;; \ - 'ppc64le') \ - export GOARCH='ppc64le' GOOS='linux'; \ - ;; \ - 'riscv64') \ - export GOARCH='riscv64' GOOS='linux'; \ - ;; \ - 's390x') \ - export GOARCH='s390x' GOOS='linux'; \ - ;; \ - *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ - esac; \ - build=; \ - if [ -z "$url" ]; then \ -# https://github.com/golang/go/issues/38536#issuecomment-616897960 - build=1; \ - url='https://dl.google.com/go/go1.20.14.src.tar.gz'; \ - sha256='1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e'; \ -# the precompiled binaries published by Go upstream were not compatible with Alpine in Go 1.20, so we always build from source here 😅 - fi; \ - \ - wget -O go.tgz.asc "$url.asc"; \ - wget -O go.tgz "$url"; \ - echo "$sha256 *go.tgz" | sha256sum -c -; \ - \ -# https://github.com/golang/go/issues/14739#issuecomment-324767697 - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ -# https://www.google.com/linuxrepositories/ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ -# let's also fetch the specific subkey of that key explicitly that we expect "go.tgz.asc" to be signed by, just to make sure we definitely have it - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; \ - gpg --batch --verify go.tgz.asc go.tgz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" go.tgz.asc; \ - \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ -# save the timestamp from the tarball so we can restore it for reproducibility, if necessary (see below) - SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/local/go)"; \ - export SOURCE_DATE_EPOCH; \ -# for logging validation/edification - date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ - \ - if [ -n "$build" ]; then \ - apk add --no-cache --virtual .build-deps \ - bash \ - gcc \ - go \ - musl-dev \ - ; \ - \ - export GOCACHE='/tmp/gocache'; \ - \ - ( \ - 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 [ "${GOARCH:-}" = '386' ]; then \ -# https://github.com/golang/go/issues/52919; https://github.com/docker-library/golang/pull/426#issuecomment-1152623837 - export CGO_CFLAGS='-fno-stack-protector'; \ - fi; \ - ./make.bash; \ - ); \ - \ - apk del --no-network .build-deps; \ - \ -# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain - rm -rf \ - /usr/local/go/pkg/*/cmd \ - /usr/local/go/pkg/bootstrap \ - /usr/local/go/pkg/obj \ - /usr/local/go/pkg/tool/*/api \ - /usr/local/go/pkg/tool/*/go_bootstrap \ - /usr/local/go/src/cmd/dist/dist \ - "$GOCACHE" \ - ; \ - \ -# clamp timestamps for reproducibility (allows "COPY --link" to be more clever/useful) - date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ - touch -t "$date" /usr/local/.go-date-stamp; \ - find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ - rm /usr/local/.go-date-stamp; \ - touch -t "$date" /usr/local; \ - fi; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - go version; \ -# make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) - epoch="$(stat -c '%Y' /usr/local/go)"; \ - [ "$SOURCE_DATE_EPOCH" = "$epoch" ] - -FROM alpine:3.19 - -RUN apk add --no-cache ca-certificates - -ENV GOLANG_VERSION 1.20.14 - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -COPY --from=build --link /usr/local/go/ /usr/local/go/ -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" -WORKDIR $GOPATH diff --git a/1.20/bookworm/Dockerfile b/1.20/bookworm/Dockerfile deleted file mode 100644 index dfe231d7..00000000 --- a/1.20/bookworm/Dockerfile +++ /dev/null @@ -1,152 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm-scm AS build - -ENV PATH /usr/local/go/bin:$PATH - -ENV GOLANG_VERSION 1.20.14 - -RUN set -eux; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ - url=; \ - case "$arch" in \ - 'amd64') \ - url='https://dl.google.com/go/go1.20.14.linux-amd64.tar.gz'; \ - sha256='ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44'; \ - ;; \ - 'armel') \ - export GOARCH='arm' GOARM='5' GOOS='linux'; \ - ;; \ - 'armhf') \ - url='https://dl.google.com/go/go1.20.14.linux-armv6l.tar.gz'; \ - sha256='803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203'; \ - ;; \ - 'arm64') \ - url='https://dl.google.com/go/go1.20.14.linux-arm64.tar.gz'; \ - sha256='2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b'; \ - ;; \ - 'i386') \ - url='https://dl.google.com/go/go1.20.14.linux-386.tar.gz'; \ - sha256='9c0acad376b41292c6e9e5534e26d9432f92a214d6c40a7e4c024b0235cc30e8'; \ - ;; \ - 'mips64el') \ - export GOARCH='mips64le' GOOS='linux'; \ - ;; \ - 'ppc64el') \ - url='https://dl.google.com/go/go1.20.14.linux-ppc64le.tar.gz'; \ - sha256='237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd'; \ - ;; \ - 'riscv64') \ - export GOARCH='riscv64' GOOS='linux'; \ - ;; \ - 's390x') \ - url='https://dl.google.com/go/go1.20.14.linux-s390x.tar.gz'; \ - sha256='8d41fa5bcf78a7a2e8bff94d1ee27d6996a5c80884ccf4a4f7a9c785407b6d30'; \ - ;; \ - *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ - esac; \ - build=; \ - if [ -z "$url" ]; then \ -# https://github.com/golang/go/issues/38536#issuecomment-616897960 - build=1; \ - url='https://dl.google.com/go/go1.20.14.src.tar.gz'; \ - sha256='1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e'; \ - echo >&2; \ - echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \ - echo >&2; \ - fi; \ - \ - wget -O go.tgz.asc "$url.asc"; \ - wget -O go.tgz "$url" --progress=dot:giga; \ - echo "$sha256 *go.tgz" | sha256sum -c -; \ - \ -# https://github.com/golang/go/issues/14739#issuecomment-324767697 - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ -# https://www.google.com/linuxrepositories/ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ -# let's also fetch the specific subkey of that key explicitly that we expect "go.tgz.asc" to be signed by, just to make sure we definitely have it - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; \ - gpg --batch --verify go.tgz.asc go.tgz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" go.tgz.asc; \ - \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ -# save the timestamp from the tarball so we can restore it for reproducibility, if necessary (see below) - SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/local/go)"; \ - export SOURCE_DATE_EPOCH; \ -# for logging validation/edification - date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ - \ - if [ -n "$build" ]; then \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends golang-go; \ -# cgo-related deps (for 1.21+, we should instead use CGO_ENABLED=0; https://github.com/golang/go/blob/b44f6378233ada888f0dc79e0ac56def4673d9ed/src/cmd/dist/build.go#L1312 / https://github.com/golang/go/commit/da0c375c571037ec5ea6f8ef2be8f07593b40eb6) - apt-get install -y --no-install-recommends gcc libc6-dev; \ - \ - export GOCACHE='/tmp/gocache'; \ - \ - ( \ - 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"; \ - ./make.bash; \ - ); \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain - rm -rf \ - /usr/local/go/pkg/*/cmd \ - /usr/local/go/pkg/bootstrap \ - /usr/local/go/pkg/obj \ - /usr/local/go/pkg/tool/*/api \ - /usr/local/go/pkg/tool/*/go_bootstrap \ - /usr/local/go/src/cmd/dist/dist \ - "$GOCACHE" \ - ; \ - \ -# clamp timestamps for reproducibility (allows "COPY --link" to be more clever/useful) - date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ - touch -t "$date" /usr/local/.go-date-stamp; \ - find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ - rm /usr/local/.go-date-stamp; \ - touch -t "$date" /usr/local; \ - fi; \ - \ -# smoke test - go version; \ -# make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) - epoch="$(stat -c '%Y' /usr/local/go)"; \ - [ "$SOURCE_DATE_EPOCH" = "$epoch" ] - -FROM buildpack-deps:bookworm-scm - -# install cgo-related dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - g++ \ - gcc \ - libc6-dev \ - make \ - pkg-config \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GOLANG_VERSION 1.20.14 - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -COPY --from=build --link /usr/local/go/ /usr/local/go/ -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" -WORKDIR $GOPATH diff --git a/1.20/bullseye/Dockerfile b/1.20/bullseye/Dockerfile deleted file mode 100644 index 5781b9da..00000000 --- a/1.20/bullseye/Dockerfile +++ /dev/null @@ -1,158 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye-scm AS build - -ENV PATH /usr/local/go/bin:$PATH - -ENV GOLANG_VERSION 1.20.14 - -RUN set -eux; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ - url=; \ - case "$arch" in \ - 'amd64') \ - url='https://dl.google.com/go/go1.20.14.linux-amd64.tar.gz'; \ - sha256='ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44'; \ - ;; \ - 'armel') \ - export GOARCH='arm' GOARM='5' GOOS='linux'; \ - ;; \ - 'armhf') \ - url='https://dl.google.com/go/go1.20.14.linux-armv6l.tar.gz'; \ - sha256='803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203'; \ - ;; \ - 'arm64') \ - url='https://dl.google.com/go/go1.20.14.linux-arm64.tar.gz'; \ - sha256='2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b'; \ - ;; \ - 'i386') \ - url='https://dl.google.com/go/go1.20.14.linux-386.tar.gz'; \ - sha256='9c0acad376b41292c6e9e5534e26d9432f92a214d6c40a7e4c024b0235cc30e8'; \ - ;; \ - 'mips64el') \ - export GOARCH='mips64le' GOOS='linux'; \ - ;; \ - 'ppc64el') \ - url='https://dl.google.com/go/go1.20.14.linux-ppc64le.tar.gz'; \ - sha256='237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd'; \ - ;; \ - 'riscv64') \ - export GOARCH='riscv64' GOOS='linux'; \ - ;; \ - 's390x') \ - url='https://dl.google.com/go/go1.20.14.linux-s390x.tar.gz'; \ - sha256='8d41fa5bcf78a7a2e8bff94d1ee27d6996a5c80884ccf4a4f7a9c785407b6d30'; \ - ;; \ - *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ - esac; \ - build=; \ - if [ -z "$url" ]; then \ -# https://github.com/golang/go/issues/38536#issuecomment-616897960 - build=1; \ - url='https://dl.google.com/go/go1.20.14.src.tar.gz'; \ - sha256='1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e'; \ - echo >&2; \ - echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \ - echo >&2; \ - fi; \ - \ - wget -O go.tgz.asc "$url.asc"; \ - wget -O go.tgz "$url" --progress=dot:giga; \ - echo "$sha256 *go.tgz" | sha256sum -c -; \ - \ -# https://github.com/golang/go/issues/14739#issuecomment-324767697 - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ -# https://www.google.com/linuxrepositories/ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ -# let's also fetch the specific subkey of that key explicitly that we expect "go.tgz.asc" to be signed by, just to make sure we definitely have it - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; \ - gpg --batch --verify go.tgz.asc go.tgz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" go.tgz.asc; \ - \ - tar -C /usr/local -xzf go.tgz; \ - rm go.tgz; \ - \ -# save the timestamp from the tarball so we can restore it for reproducibility, if necessary (see below) - SOURCE_DATE_EPOCH="$(stat -c '%Y' /usr/local/go)"; \ - export SOURCE_DATE_EPOCH; \ -# for logging validation/edification - date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ - \ - if [ -n "$build" ]; then \ - savedAptMark="$(apt-mark showmanual)"; \ -# add backports for newer go version for bootstrap build: https://github.com/golang/go/issues/44505 - ( \ - . /etc/os-release; \ - echo "deb https://deb.debian.org/debian $VERSION_CODENAME-backports main" > /etc/apt/sources.list.d/backports.list; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends -t "$VERSION_CODENAME-backports" golang-go; \ - ); \ -# cgo-related deps (for 1.21+, we should instead use CGO_ENABLED=0; https://github.com/golang/go/blob/b44f6378233ada888f0dc79e0ac56def4673d9ed/src/cmd/dist/build.go#L1312 / https://github.com/golang/go/commit/da0c375c571037ec5ea6f8ef2be8f07593b40eb6) - apt-get install -y --no-install-recommends gcc libc6-dev; \ - \ - export GOCACHE='/tmp/gocache'; \ - \ - ( \ - 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"; \ - ./make.bash; \ - ); \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain - rm -rf \ - /usr/local/go/pkg/*/cmd \ - /usr/local/go/pkg/bootstrap \ - /usr/local/go/pkg/obj \ - /usr/local/go/pkg/tool/*/api \ - /usr/local/go/pkg/tool/*/go_bootstrap \ - /usr/local/go/src/cmd/dist/dist \ - "$GOCACHE" \ - ; \ - \ -# clamp timestamps for reproducibility (allows "COPY --link" to be more clever/useful) - date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ - touch -t "$date" /usr/local/.go-date-stamp; \ - find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ - rm /usr/local/.go-date-stamp; \ - touch -t "$date" /usr/local; \ - fi; \ - \ -# smoke test - go version; \ -# make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) - epoch="$(stat -c '%Y' /usr/local/go)"; \ - [ "$SOURCE_DATE_EPOCH" = "$epoch" ] - -FROM buildpack-deps:bullseye-scm - -# install cgo-related dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - g++ \ - gcc \ - libc6-dev \ - make \ - pkg-config \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GOLANG_VERSION 1.20.14 - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -COPY --from=build --link /usr/local/go/ /usr/local/go/ -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" -WORKDIR $GOPATH diff --git a/1.20/windows/nanoserver-ltsc2022/Dockerfile b/1.20/windows/nanoserver-ltsc2022/Dockerfile deleted file mode 100644 index ea3ba754..00000000 --- a/1.20/windows/nanoserver-ltsc2022/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 - -SHELL ["cmd", "/S", "/C"] - -# no Git installed (intentionally) -# -- Nano Server is "Windows Slim" - -# for 1.17+, we'll follow the (new) Go upstream default for install (https://golang.org/cl/283600), which frees up C:\go to be the default GOPATH and thus match the Linux images more closely (https://github.com/docker-library/golang/issues/288) -ENV GOPATH C:\\go -# HOWEVER, please note that it is the Go upstream intention to remove GOPATH support entirely: https://blog.golang.org/go116-module-changes - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -USER ContainerAdministrator -RUN setx /m PATH "%GOPATH%\bin;C:\Program Files\Go\bin;%PATH%" -USER ContainerUser -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.20.14 - -# Docker's Windows path parsing is absolutely *cursed*; please just trust me on this one -Tianon -COPY --from=golang:1.20.14-windowsservercore-ltsc2022 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] -RUN go version - -WORKDIR $GOPATH diff --git a/1.20/windows/windowsservercore-ltsc2022/Dockerfile b/1.20/windows/windowsservercore-ltsc2022/Dockerfile deleted file mode 100644 index dece39ff..00000000 --- a/1.20/windows/windowsservercore-ltsc2022/Dockerfile +++ /dev/null @@ -1,84 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM mcr.microsoft.com/windows/servercore:ltsc2022 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# install MinGit (especially for "go get") -# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ -# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." -# "It currently requires only ~45MB on disk." -ENV GIT_VERSION 2.23.0 -ENV GIT_TAG v${GIT_VERSION}.windows.1 -ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip -ENV GIT_DOWNLOAD_SHA256 8f65208f92c0b4c3ae4c0cf02d4b5f6791d539cd1a07b2df62b7116467724735 -# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) -RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ - if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item git.zip -Force; \ - \ - Write-Host 'Updating PATH ...'; \ - $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ - [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ - \ - Write-Host 'Verifying install ("git version") ...'; \ - git version; \ - \ - Write-Host 'Complete.'; - -# for 1.17+, we'll follow the (new) Go upstream default for install (https://golang.org/cl/283600), which frees up C:\go to be the default GOPATH and thus match the Linux images more closely (https://github.com/docker-library/golang/issues/288) -ENV GOPATH C:\\go -# HOWEVER, please note that it is the Go upstream intention to remove GOPATH support entirely: https://blog.golang.org/go116-module-changes - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH); \ - Write-Host ('Updating PATH: {0}' -f $newPath); \ - [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.20.14 - -RUN $url = 'https://dl.google.com/go/go1.20.14.windows-amd64.zip'; \ - Write-Host ('Downloading {0} ...' -f $url); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ - \ - $sha256 = '0e0d0190406ead891d94ecf00f961bb5cfa15ddd47499d2649f12eee80aee110'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive go.zip -DestinationPath C:\; \ - \ - Write-Host 'Moving ...'; \ - Move-Item -Path C:\go -Destination 'C:\Program Files\Go'; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item go.zip -Force; \ - \ - Write-Host 'Verifying install ("go version") ...'; \ - go version; \ - \ - Write-Host 'Complete.'; - -WORKDIR $GOPATH diff --git a/1.21/alpine3.18/Dockerfile b/1.21/alpine3.18/Dockerfile index b00f7c92..c1652561 100644 --- a/1.21/alpine3.18/Dockerfile +++ b/1.21/alpine3.18/Dockerfile @@ -78,6 +78,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armv7' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ apk del --no-network .fetch-deps; \ \ # smoke test diff --git a/1.21/alpine3.19/Dockerfile b/1.21/alpine3.19/Dockerfile index e1db0007..87fcb4c2 100644 --- a/1.21/alpine3.19/Dockerfile +++ b/1.21/alpine3.19/Dockerfile @@ -78,6 +78,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armv7' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ apk del --no-network .fetch-deps; \ \ # smoke test diff --git a/1.21/bookworm/Dockerfile b/1.21/bookworm/Dockerfile index b252acc8..50705a85 100644 --- a/1.21/bookworm/Dockerfile +++ b/1.21/bookworm/Dockerfile @@ -72,6 +72,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armhf' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ # smoke test go version; \ # make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) diff --git a/1.21/bullseye/Dockerfile b/1.21/bullseye/Dockerfile index b8a0f387..b5a2a4f3 100644 --- a/1.21/bullseye/Dockerfile +++ b/1.21/bullseye/Dockerfile @@ -72,6 +72,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armhf' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ # smoke test go version; \ # make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) diff --git a/1.22-rc/windows/nanoserver-1809/Dockerfile b/1.22-rc/windows/nanoserver-1809/Dockerfile deleted file mode 100644 index 61184716..00000000 --- a/1.22-rc/windows/nanoserver-1809/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM mcr.microsoft.com/windows/nanoserver:1809 - -SHELL ["cmd", "/S", "/C"] - -# no Git installed (intentionally) -# -- Nano Server is "Windows Slim" - -# for 1.17+, we'll follow the (new) Go upstream default for install (https://golang.org/cl/283600), which frees up C:\go to be the default GOPATH and thus match the Linux images more closely (https://github.com/docker-library/golang/issues/288) -ENV GOPATH C:\\go -# HOWEVER, please note that it is the Go upstream intention to remove GOPATH support entirely: https://blog.golang.org/go116-module-changes - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -USER ContainerAdministrator -RUN setx /m PATH "%GOPATH%\bin;C:\Program Files\Go\bin;%PATH%" -USER ContainerUser -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.22rc2 - -# Docker's Windows path parsing is absolutely *cursed*; please just trust me on this one -Tianon -COPY --from=golang:1.22rc2-windowsservercore-1809 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] -RUN go version - -WORKDIR $GOPATH diff --git a/1.22-rc/windows/windowsservercore-1809/Dockerfile b/1.22-rc/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index cf48256f..00000000 --- a/1.22-rc/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,84 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM mcr.microsoft.com/windows/servercore:1809 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -# install MinGit (especially for "go get") -# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ -# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." -# "It currently requires only ~45MB on disk." -ENV GIT_VERSION 2.23.0 -ENV GIT_TAG v${GIT_VERSION}.windows.1 -ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip -ENV GIT_DOWNLOAD_SHA256 8f65208f92c0b4c3ae4c0cf02d4b5f6791d539cd1a07b2df62b7116467724735 -# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) -RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ - if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item git.zip -Force; \ - \ - Write-Host 'Updating PATH ...'; \ - $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ - [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ - \ - Write-Host 'Verifying install ("git version") ...'; \ - git version; \ - \ - Write-Host 'Complete.'; - -# for 1.17+, we'll follow the (new) Go upstream default for install (https://golang.org/cl/283600), which frees up C:\go to be the default GOPATH and thus match the Linux images more closely (https://github.com/docker-library/golang/issues/288) -ENV GOPATH C:\\go -# HOWEVER, please note that it is the Go upstream intention to remove GOPATH support entirely: https://blog.golang.org/go116-module-changes - -# PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH); \ - Write-Host ('Updating PATH: {0}' -f $newPath); \ - [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); -# doing this first to share cache across versions more aggressively - -ENV GOLANG_VERSION 1.22rc2 - -RUN $url = 'https://dl.google.com/go/go1.22rc2.windows-amd64.zip'; \ - Write-Host ('Downloading {0} ...' -f $url); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ - \ - $sha256 = 'e311dc7a7f4d77ac4227cb463009dda2b8cdb33bc698e94e2222d63ecbb24b2b'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive go.zip -DestinationPath C:\; \ - \ - Write-Host 'Moving ...'; \ - Move-Item -Path C:\go -Destination 'C:\Program Files\Go'; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item go.zip -Force; \ - \ - Write-Host 'Verifying install ("go version") ...'; \ - go version; \ - \ - Write-Host 'Complete.'; - -WORKDIR $GOPATH diff --git a/1.22-rc/alpine3.18/Dockerfile b/1.22/alpine3.18/Dockerfile similarity index 59% rename from 1.22-rc/alpine3.18/Dockerfile rename to 1.22/alpine3.18/Dockerfile index b67066ae..319eec71 100644 --- a/1.22-rc/alpine3.18/Dockerfile +++ b/1.22/alpine3.18/Dockerfile @@ -8,7 +8,7 @@ FROM alpine:3.18 AS build ENV PATH /usr/local/go/bin:$PATH -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 RUN set -eux; \ apk add --no-cache --virtual .fetch-deps \ @@ -21,36 +21,36 @@ RUN set -eux; \ url=; \ case "$arch" in \ 'x86_64') \ - url='https://dl.google.com/go/go1.22rc2.linux-amd64.tar.gz'; \ - sha256='f811e7ee8f6dee3d162179229f96a64a467c8c02a5687fac5ceaadcf3948c818'; \ + url='https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz'; \ + sha256='f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265'; \ ;; \ 'armhf') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'armv7') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'aarch64') \ - url='https://dl.google.com/go/go1.22rc2.linux-arm64.tar.gz'; \ - sha256='bf18dc64a396948f97df79a3d73176dbaa7d69341256a1ff1067fd7ec5f79295'; \ + url='https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz'; \ + sha256='6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10'; \ ;; \ 'x86') \ - url='https://dl.google.com/go/go1.22rc2.linux-386.tar.gz'; \ - sha256='15321745f1e22a4930bdbf53c456c3aab42204c35c9a0dec4bbe1c641518e502'; \ + url='https://dl.google.com/go/go1.22.0.linux-386.tar.gz'; \ + sha256='1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3'; \ ;; \ 'ppc64le') \ - url='https://dl.google.com/go/go1.22rc2.linux-ppc64le.tar.gz'; \ - sha256='6f5aab8f36732d5d4b92ca6c96c9b8fa188b561b339740d52facab59a468c1e9'; \ + url='https://dl.google.com/go/go1.22.0.linux-ppc64le.tar.gz'; \ + sha256='0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93'; \ ;; \ 'riscv64') \ - url='https://dl.google.com/go/go1.22rc2.linux-riscv64.tar.gz'; \ - sha256='1b146b19a46a010e263369a72498356447ba0f71f608cb90af01729d00529f40'; \ + url='https://dl.google.com/go/go1.22.0.linux-riscv64.tar.gz'; \ + sha256='afe9cedcdbd6fdff27c57efd30aa5ce0f666f471fed5fa96cd4fb38d6b577086'; \ ;; \ 's390x') \ - url='https://dl.google.com/go/go1.22rc2.linux-s390x.tar.gz'; \ - sha256='12c9438147094fe33d99ee70d85c8fad1894b643aa0c6d355034fadac2fb7cfd'; \ + url='https://dl.google.com/go/go1.22.0.linux-s390x.tar.gz'; \ + sha256='2e546a3583ba7bd3988f8f476245698f6a93dfa9fe206a8ca8f85c1ceecb2446'; \ ;; \ *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ esac; \ @@ -78,6 +78,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armv7' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ apk del --no-network .fetch-deps; \ \ # smoke test @@ -90,7 +104,7 @@ FROM alpine:3.18 RUN apk add --no-cache ca-certificates -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 # don't auto-upgrade the gotoolchain # https://github.com/docker-library/golang/issues/472 diff --git a/1.22-rc/alpine3.19/Dockerfile b/1.22/alpine3.19/Dockerfile similarity index 59% rename from 1.22-rc/alpine3.19/Dockerfile rename to 1.22/alpine3.19/Dockerfile index 33151cb7..5aa45f9e 100644 --- a/1.22-rc/alpine3.19/Dockerfile +++ b/1.22/alpine3.19/Dockerfile @@ -8,7 +8,7 @@ FROM alpine:3.19 AS build ENV PATH /usr/local/go/bin:$PATH -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 RUN set -eux; \ apk add --no-cache --virtual .fetch-deps \ @@ -21,36 +21,36 @@ RUN set -eux; \ url=; \ case "$arch" in \ 'x86_64') \ - url='https://dl.google.com/go/go1.22rc2.linux-amd64.tar.gz'; \ - sha256='f811e7ee8f6dee3d162179229f96a64a467c8c02a5687fac5ceaadcf3948c818'; \ + url='https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz'; \ + sha256='f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265'; \ ;; \ 'armhf') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'armv7') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'aarch64') \ - url='https://dl.google.com/go/go1.22rc2.linux-arm64.tar.gz'; \ - sha256='bf18dc64a396948f97df79a3d73176dbaa7d69341256a1ff1067fd7ec5f79295'; \ + url='https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz'; \ + sha256='6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10'; \ ;; \ 'x86') \ - url='https://dl.google.com/go/go1.22rc2.linux-386.tar.gz'; \ - sha256='15321745f1e22a4930bdbf53c456c3aab42204c35c9a0dec4bbe1c641518e502'; \ + url='https://dl.google.com/go/go1.22.0.linux-386.tar.gz'; \ + sha256='1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3'; \ ;; \ 'ppc64le') \ - url='https://dl.google.com/go/go1.22rc2.linux-ppc64le.tar.gz'; \ - sha256='6f5aab8f36732d5d4b92ca6c96c9b8fa188b561b339740d52facab59a468c1e9'; \ + url='https://dl.google.com/go/go1.22.0.linux-ppc64le.tar.gz'; \ + sha256='0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93'; \ ;; \ 'riscv64') \ - url='https://dl.google.com/go/go1.22rc2.linux-riscv64.tar.gz'; \ - sha256='1b146b19a46a010e263369a72498356447ba0f71f608cb90af01729d00529f40'; \ + url='https://dl.google.com/go/go1.22.0.linux-riscv64.tar.gz'; \ + sha256='afe9cedcdbd6fdff27c57efd30aa5ce0f666f471fed5fa96cd4fb38d6b577086'; \ ;; \ 's390x') \ - url='https://dl.google.com/go/go1.22rc2.linux-s390x.tar.gz'; \ - sha256='12c9438147094fe33d99ee70d85c8fad1894b643aa0c6d355034fadac2fb7cfd'; \ + url='https://dl.google.com/go/go1.22.0.linux-s390x.tar.gz'; \ + sha256='2e546a3583ba7bd3988f8f476245698f6a93dfa9fe206a8ca8f85c1ceecb2446'; \ ;; \ *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ esac; \ @@ -78,6 +78,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armv7' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ apk del --no-network .fetch-deps; \ \ # smoke test @@ -90,7 +104,7 @@ FROM alpine:3.19 RUN apk add --no-cache ca-certificates -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 # don't auto-upgrade the gotoolchain # https://github.com/docker-library/golang/issues/472 diff --git a/1.22-rc/bookworm/Dockerfile b/1.22/bookworm/Dockerfile similarity index 58% rename from 1.22-rc/bookworm/Dockerfile rename to 1.22/bookworm/Dockerfile index 793a243d..43c8a6f1 100644 --- a/1.22-rc/bookworm/Dockerfile +++ b/1.22/bookworm/Dockerfile @@ -8,43 +8,43 @@ FROM buildpack-deps:bookworm-scm AS build ENV PATH /usr/local/go/bin:$PATH -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 RUN set -eux; \ arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ url=; \ case "$arch" in \ 'amd64') \ - url='https://dl.google.com/go/go1.22rc2.linux-amd64.tar.gz'; \ - sha256='f811e7ee8f6dee3d162179229f96a64a467c8c02a5687fac5ceaadcf3948c818'; \ + url='https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz'; \ + sha256='f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265'; \ ;; \ 'armhf') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'arm64') \ - url='https://dl.google.com/go/go1.22rc2.linux-arm64.tar.gz'; \ - sha256='bf18dc64a396948f97df79a3d73176dbaa7d69341256a1ff1067fd7ec5f79295'; \ + url='https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz'; \ + sha256='6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10'; \ ;; \ 'i386') \ - url='https://dl.google.com/go/go1.22rc2.linux-386.tar.gz'; \ - sha256='15321745f1e22a4930bdbf53c456c3aab42204c35c9a0dec4bbe1c641518e502'; \ + url='https://dl.google.com/go/go1.22.0.linux-386.tar.gz'; \ + sha256='1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3'; \ ;; \ 'mips64el') \ - url='https://dl.google.com/go/go1.22rc2.linux-mips64le.tar.gz'; \ - sha256='d52d63c45b479ad31f44bdee2e5dfee9e2afce9d42a61c5ac453cb0214b6bd13'; \ + url='https://dl.google.com/go/go1.22.0.linux-mips64le.tar.gz'; \ + sha256='c162a1a516b8bc8839fc0c0283ad90f6b511e5aca3da4939ed4800f124b9e72c'; \ ;; \ 'ppc64el') \ - url='https://dl.google.com/go/go1.22rc2.linux-ppc64le.tar.gz'; \ - sha256='6f5aab8f36732d5d4b92ca6c96c9b8fa188b561b339740d52facab59a468c1e9'; \ + url='https://dl.google.com/go/go1.22.0.linux-ppc64le.tar.gz'; \ + sha256='0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93'; \ ;; \ 'riscv64') \ - url='https://dl.google.com/go/go1.22rc2.linux-riscv64.tar.gz'; \ - sha256='1b146b19a46a010e263369a72498356447ba0f71f608cb90af01729d00529f40'; \ + url='https://dl.google.com/go/go1.22.0.linux-riscv64.tar.gz'; \ + sha256='afe9cedcdbd6fdff27c57efd30aa5ce0f666f471fed5fa96cd4fb38d6b577086'; \ ;; \ 's390x') \ - url='https://dl.google.com/go/go1.22rc2.linux-s390x.tar.gz'; \ - sha256='12c9438147094fe33d99ee70d85c8fad1894b643aa0c6d355034fadac2fb7cfd'; \ + url='https://dl.google.com/go/go1.22.0.linux-s390x.tar.gz'; \ + sha256='2e546a3583ba7bd3988f8f476245698f6a93dfa9fe206a8ca8f85c1ceecb2446'; \ ;; \ *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ esac; \ @@ -72,6 +72,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armhf' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ # smoke test go version; \ # make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) @@ -92,7 +106,7 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 # don't auto-upgrade the gotoolchain # https://github.com/docker-library/golang/issues/472 diff --git a/1.22-rc/bullseye/Dockerfile b/1.22/bullseye/Dockerfile similarity index 58% rename from 1.22-rc/bullseye/Dockerfile rename to 1.22/bullseye/Dockerfile index 0b256498..decbab6e 100644 --- a/1.22-rc/bullseye/Dockerfile +++ b/1.22/bullseye/Dockerfile @@ -8,43 +8,43 @@ FROM buildpack-deps:bullseye-scm AS build ENV PATH /usr/local/go/bin:$PATH -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 RUN set -eux; \ arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ url=; \ case "$arch" in \ 'amd64') \ - url='https://dl.google.com/go/go1.22rc2.linux-amd64.tar.gz'; \ - sha256='f811e7ee8f6dee3d162179229f96a64a467c8c02a5687fac5ceaadcf3948c818'; \ + url='https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz'; \ + sha256='f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265'; \ ;; \ 'armhf') \ - url='https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz'; \ - sha256='2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709'; \ + url='https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz'; \ + sha256='0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4'; \ ;; \ 'arm64') \ - url='https://dl.google.com/go/go1.22rc2.linux-arm64.tar.gz'; \ - sha256='bf18dc64a396948f97df79a3d73176dbaa7d69341256a1ff1067fd7ec5f79295'; \ + url='https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz'; \ + sha256='6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10'; \ ;; \ 'i386') \ - url='https://dl.google.com/go/go1.22rc2.linux-386.tar.gz'; \ - sha256='15321745f1e22a4930bdbf53c456c3aab42204c35c9a0dec4bbe1c641518e502'; \ + url='https://dl.google.com/go/go1.22.0.linux-386.tar.gz'; \ + sha256='1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3'; \ ;; \ 'mips64el') \ - url='https://dl.google.com/go/go1.22rc2.linux-mips64le.tar.gz'; \ - sha256='d52d63c45b479ad31f44bdee2e5dfee9e2afce9d42a61c5ac453cb0214b6bd13'; \ + url='https://dl.google.com/go/go1.22.0.linux-mips64le.tar.gz'; \ + sha256='c162a1a516b8bc8839fc0c0283ad90f6b511e5aca3da4939ed4800f124b9e72c'; \ ;; \ 'ppc64el') \ - url='https://dl.google.com/go/go1.22rc2.linux-ppc64le.tar.gz'; \ - sha256='6f5aab8f36732d5d4b92ca6c96c9b8fa188b561b339740d52facab59a468c1e9'; \ + url='https://dl.google.com/go/go1.22.0.linux-ppc64le.tar.gz'; \ + sha256='0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93'; \ ;; \ 'riscv64') \ - url='https://dl.google.com/go/go1.22rc2.linux-riscv64.tar.gz'; \ - sha256='1b146b19a46a010e263369a72498356447ba0f71f608cb90af01729d00529f40'; \ + url='https://dl.google.com/go/go1.22.0.linux-riscv64.tar.gz'; \ + sha256='afe9cedcdbd6fdff27c57efd30aa5ce0f666f471fed5fa96cd4fb38d6b577086'; \ ;; \ 's390x') \ - url='https://dl.google.com/go/go1.22rc2.linux-s390x.tar.gz'; \ - sha256='12c9438147094fe33d99ee70d85c8fad1894b643aa0c6d355034fadac2fb7cfd'; \ + url='https://dl.google.com/go/go1.22.0.linux-s390x.tar.gz'; \ + sha256='2e546a3583ba7bd3988f8f476245698f6a93dfa9fe206a8ca8f85c1ceecb2446'; \ ;; \ *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ esac; \ @@ -72,6 +72,20 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ + if [ "$arch" = 'armhf' ]; then \ + [ -s /usr/local/go/go.env ]; \ + before="$(go env GOARM)"; [ "$before" != '7' ]; \ + { \ + echo; \ + echo '# https://github.com/docker-library/golang/issues/494'; \ + echo 'GOARM=7'; \ + } >> /usr/local/go/go.env; \ + after="$(go env GOARM)"; [ "$after" = '7' ]; \ +# (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) + date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ + touch -t "$date" /usr/local/go/go.env /usr/local/go; \ + fi; \ + \ # smoke test go version; \ # make sure our reproducibile timestamp is probably still correct (best-effort inline reproducibility test) @@ -92,7 +106,7 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 # don't auto-upgrade the gotoolchain # https://github.com/docker-library/golang/issues/472 diff --git a/1.20/windows/nanoserver-1809/Dockerfile b/1.22/windows/nanoserver-1809/Dockerfile similarity index 88% rename from 1.20/windows/nanoserver-1809/Dockerfile rename to 1.22/windows/nanoserver-1809/Dockerfile index 5f0acde5..5c133808 100644 --- a/1.20/windows/nanoserver-1809/Dockerfile +++ b/1.22/windows/nanoserver-1809/Dockerfile @@ -21,10 +21,10 @@ RUN setx /m PATH "%GOPATH%\bin;C:\Program Files\Go\bin;%PATH%" USER ContainerUser # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.20.14 +ENV GOLANG_VERSION 1.22.0 # Docker's Windows path parsing is absolutely *cursed*; please just trust me on this one -Tianon -COPY --from=golang:1.20.14-windowsservercore-1809 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] +COPY --from=golang:1.22.0-windowsservercore-1809 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] RUN go version WORKDIR $GOPATH diff --git a/1.22-rc/windows/nanoserver-ltsc2022/Dockerfile b/1.22/windows/nanoserver-ltsc2022/Dockerfile similarity index 88% rename from 1.22-rc/windows/nanoserver-ltsc2022/Dockerfile rename to 1.22/windows/nanoserver-ltsc2022/Dockerfile index 3aa6824d..0ef60daf 100644 --- a/1.22-rc/windows/nanoserver-ltsc2022/Dockerfile +++ b/1.22/windows/nanoserver-ltsc2022/Dockerfile @@ -21,10 +21,10 @@ RUN setx /m PATH "%GOPATH%\bin;C:\Program Files\Go\bin;%PATH%" USER ContainerUser # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 # Docker's Windows path parsing is absolutely *cursed*; please just trust me on this one -Tianon -COPY --from=golang:1.22rc2-windowsservercore-ltsc2022 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] +COPY --from=golang:1.22.0-windowsservercore-ltsc2022 ["C:\\\\Program Files\\\\Go","C:\\\\Program Files\\\\Go"] RUN go version WORKDIR $GOPATH diff --git a/1.20/windows/windowsservercore-1809/Dockerfile b/1.22/windows/windowsservercore-1809/Dockerfile similarity index 95% rename from 1.20/windows/windowsservercore-1809/Dockerfile rename to 1.22/windows/windowsservercore-1809/Dockerfile index 65ecf1bd..2185a124 100644 --- a/1.20/windows/windowsservercore-1809/Dockerfile +++ b/1.22/windows/windowsservercore-1809/Dockerfile @@ -53,14 +53,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH) [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.20.14 +ENV GOLANG_VERSION 1.22.0 -RUN $url = 'https://dl.google.com/go/go1.20.14.windows-amd64.zip'; \ +RUN $url = 'https://dl.google.com/go/go1.22.0.windows-amd64.zip'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = '0e0d0190406ead891d94ecf00f961bb5cfa15ddd47499d2649f12eee80aee110'; \ + $sha256 = '78b3158fe3aa358e0b6c9f26ecd338f9a11441e88bc434ae2e9f0ca2b0cc4dd3'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \ diff --git a/1.22-rc/windows/windowsservercore-ltsc2022/Dockerfile b/1.22/windows/windowsservercore-ltsc2022/Dockerfile similarity index 95% rename from 1.22-rc/windows/windowsservercore-ltsc2022/Dockerfile rename to 1.22/windows/windowsservercore-ltsc2022/Dockerfile index 0460ad7d..289862ed 100644 --- a/1.22-rc/windows/windowsservercore-ltsc2022/Dockerfile +++ b/1.22/windows/windowsservercore-ltsc2022/Dockerfile @@ -53,14 +53,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH) [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # doing this first to share cache across versions more aggressively -ENV GOLANG_VERSION 1.22rc2 +ENV GOLANG_VERSION 1.22.0 -RUN $url = 'https://dl.google.com/go/go1.22rc2.windows-amd64.zip'; \ +RUN $url = 'https://dl.google.com/go/go1.22.0.windows-amd64.zip'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = 'e311dc7a7f4d77ac4227cb463009dda2b8cdb33bc698e94e2222d63ecbb24b2b'; \ + $sha256 = '78b3158fe3aa358e0b6c9f26ecd338f9a11441e88bc434ae2e9f0ca2b0cc4dd3'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 5862581e..1bfd5d49 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -4,14 +4,6 @@ ; def alpine_version: env.variant | ltrimstr("alpine") - ; - def sometimes_build_from_source: - # https://github.com/docker-library/golang/pull/500#issuecomment-1863578601 - [ "1.20" ] | index(env.version | rtrimstr("-rc")) - ; - def always_build_from_source: - # https://github.com/golang/go/issues/57007! (as of Go 1.21, the upstream release binaries are fully static and thus appropriate for Alpine) - is_alpine and sometimes_build_from_source -}} {{ if is_alpine then ( -}} FROM alpine:{{ alpine_version }} AS build @@ -85,13 +77,8 @@ RUN set -eux; \ | ( -}} {{ $osArch | @sh }}) \ -{{ # TODO remove this "build-from-source" logic when 1.20 is EOL / 1.22 is GA -}} -{{ if (.url | not) or always_build_from_source then ( -}} - export {{ .env | to_entries | sort_by(.key) | map(.key + "=" + (.value | @sh)) | join(" ") }}; \ -{{ ) else ( -}} url={{ .url | @sh }}; \ sha256={{ .sha256 | @sh }}; \ -{{ ) end -}} ;; \ {{ ) @@ -99,22 +86,6 @@ RUN set -eux; \ -}} *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ esac; \ -{{ if sometimes_build_from_source then ( -}} - build=; \ - if [ -z "$url" ]; then \ -# https://github.com/golang/go/issues/38536#issuecomment-616897960 - build=1; \ - url={{ .arches.src.url | @sh }}; \ - sha256={{ .arches.src.sha256 | @sh }}; \ -{{ if always_build_from_source then ( -}} -# the precompiled binaries published by Go upstream were not compatible with Alpine in Go 1.20, so we always build from source here 😅 -{{ ) else ( -}} - echo >&2; \ - echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \ - echo >&2; \ -{{ ) end -}} - fi; \ -{{ ) else "" end -}} \ wget -O go.tgz.asc "$url.asc"; \ wget -O go.tgz "$url"{{ if is_alpine then "" else " --progress=dot:giga" end }}; \ @@ -139,77 +110,8 @@ RUN set -eux; \ # for logging validation/edification date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \ \ -{{ if sometimes_build_from_source then ( -}} - if [ -n "$build" ]; then \ -{{ if is_alpine then ( -}} - apk add --no-cache --virtual .build-deps \ - bash \ - gcc \ - go \ - musl-dev \ - ; \ -{{ ) else ( -}} - savedAptMark="$(apt-mark showmanual)"; \ -{{ if env.variant != "bullseye" then ( -}} - apt-get update; \ - apt-get install -y --no-install-recommends golang-go; \ -{{ ) else ( -}} -# add backports for newer go version for bootstrap build: https://github.com/golang/go/issues/44505 - ( \ - . /etc/os-release; \ - echo "deb https://deb.debian.org/debian $VERSION_CODENAME-backports main" > /etc/apt/sources.list.d/backports.list; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends -t "$VERSION_CODENAME-backports" golang-go; \ - ); \ -{{ ) end -}} -# cgo-related deps (for 1.21+, we should instead use CGO_ENABLED=0; https://github.com/golang/go/blob/b44f6378233ada888f0dc79e0ac56def4673d9ed/src/cmd/dist/build.go#L1312 / https://github.com/golang/go/commit/da0c375c571037ec5ea6f8ef2be8f07593b40eb6) - apt-get install -y --no-install-recommends gcc libc6-dev; \ -{{ ) end -}} - \ - export GOCACHE='/tmp/gocache'; \ - \ - ( \ - 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 is_alpine then ( -}} - if [ "${GOARCH:-}" = '386' ]; then \ -# https://github.com/golang/go/issues/52919; https://github.com/docker-library/golang/pull/426#issuecomment-1152623837 - export CGO_CFLAGS='-fno-stack-protector'; \ - fi; \ -{{ ) else "" end -}} - ./make.bash; \ - ); \ - \ -{{ if is_alpine then ( -}} - apk del --no-network .build-deps; \ -{{ ) else ( -}} - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ -{{ ) end -}} - \ -# remove a few intermediate / bootstrapping files the official binary release tarballs do not contain - rm -rf \ - /usr/local/go/pkg/*/cmd \ - /usr/local/go/pkg/bootstrap \ - /usr/local/go/pkg/obj \ - /usr/local/go/pkg/tool/*/api \ - /usr/local/go/pkg/tool/*/go_bootstrap \ - /usr/local/go/src/cmd/dist/dist \ - "$GOCACHE" \ - ; \ - \ -# clamp timestamps for reproducibility (allows "COPY --link" to be more clever/useful) - date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ - touch -t "$date" /usr/local/.go-date-stamp; \ - find /usr/local/go -depth -newer /usr/local/.go-date-stamp -exec touch -ht "$date" '{}' +; \ - rm /usr/local/.go-date-stamp; \ - touch -t "$date" /usr/local; \ -{{ if [ "1.20" ] | index(env.version) then "" elif .arches["arm32v7"].url // "" | contains("armv6") then ( -}} - elif [ "$arch" = {{ os_arches["arm32v7"] | @sh }} ]; then \ +{{ if .arches["arm32v7"].url // "" | contains("armv6") then ( -}} + if [ "$arch" = {{ os_arches["arm32v7"] | @sh }} ]; then \ [ -s /usr/local/go/go.env ]; \ before="$(go env GOARM)"; [ "$before" != {{ .arches["arm32v7"].env["GOARM"] | @sh }} ]; \ { \ @@ -221,7 +123,6 @@ RUN set -eux; \ # (re-)clamp timestamp for reproducibility (allows "COPY --link" to be more clever/useful) date="$(date -d "@$SOURCE_DATE_EPOCH" '+%Y%m%d%H%M.%S')"; \ touch -t "$date" /usr/local/go/go.env /usr/local/go; \ -{{ ) else "" end -}} fi; \ \ {{ ) else "" end -}} @@ -257,12 +158,10 @@ RUN set -eux; \ ENV GOLANG_VERSION {{ .version }} -{{ if [ "1.20" ] | index(env.version | rtrimstr("-rc")) then "" else ( -}} # don't auto-upgrade the gotoolchain # https://github.com/docker-library/golang/issues/472 ENV GOTOOLCHAIN=local -{{ ) end -}} ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH COPY --from=build --link /usr/local/go/ /usr/local/go/ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index f734c361..ba61079b 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,7 +2,7 @@ set -Eeuo pipefail declare -A aliases=( - [1.21]='1 latest' + [1.22]='1 latest' ) self="$(basename "$BASH_SOURCE")" diff --git a/versions.json b/versions.json index 088514c8..7079fc29 100644 --- a/versions.json +++ b/versions.json @@ -1,176 +1,4 @@ { - "1.20": { - "version": "1.20.14", - "arches": { - "amd64": { - "url": "https://dl.google.com/go/go1.20.14.linux-amd64.tar.gz", - "sha256": "ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44", - "env": { - "GOOS": "linux", - "GOARCH": "amd64", - "GOAMD64": "v1" - }, - "supported": true - }, - "arm32v5": { - "env": { - "GOOS": "linux", - "GOARCH": "arm", - "GOARM": "5" - }, - "supported": true - }, - "arm32v6": { - "url": "https://dl.google.com/go/go1.20.14.linux-armv6l.tar.gz", - "sha256": "803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203", - "env": { - "GOOS": "linux", - "GOARCH": "arm", - "GOARM": "6" - }, - "supported": true - }, - "arm32v7": { - "url": "https://dl.google.com/go/go1.20.14.linux-armv6l.tar.gz", - "sha256": "803c112c0f14eb794af66e28ad477c2c3f5f4969fe2bed8d920fd2be4946c203", - "env": { - "GOOS": "linux", - "GOARCH": "arm", - "GOARM": "7" - }, - "supported": true - }, - "arm64v8": { - "url": "https://dl.google.com/go/go1.20.14.linux-arm64.tar.gz", - "sha256": "2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b", - "env": { - "GOOS": "linux", - "GOARCH": "arm64" - }, - "supported": true - }, - "darwin-amd64": { - "url": "https://dl.google.com/go/go1.20.14.darwin-amd64.tar.gz", - "sha256": "754363489e2244e72cb49b4ec6ddfd6a2c60b0700f8c4876e11befb1913b11c5", - "env": { - "GOOS": "darwin", - "GOARCH": "amd64" - }, - "supported": false - }, - "darwin-arm64v8": { - "url": "https://dl.google.com/go/go1.20.14.darwin-arm64.tar.gz", - "sha256": "6da3f76164b215053daf730a9b8f1d673dbbaa4c61031374a6744b75cb728641", - "env": { - "GOOS": "darwin", - "GOARCH": "arm64" - }, - "supported": false - }, - "freebsd-amd64": { - "url": "https://dl.google.com/go/go1.20.14.freebsd-amd64.tar.gz", - "sha256": "a71fe607e718a79842864feea483288af501c0ab3fe008022a29031fea4a8c68", - "env": { - "GOOS": "freebsd", - "GOARCH": "amd64" - }, - "supported": false - }, - "freebsd-i386": { - "url": "https://dl.google.com/go/go1.20.14.freebsd-386.tar.gz", - "sha256": "e6cf2f5ea05d96cf2b1dc480bae183d600432749f5e846d4d12df985951b18d3", - "env": { - "GOOS": "freebsd", - "GOARCH": "386" - }, - "supported": false - }, - "i386": { - "url": "https://dl.google.com/go/go1.20.14.linux-386.tar.gz", - "sha256": "9c0acad376b41292c6e9e5534e26d9432f92a214d6c40a7e4c024b0235cc30e8", - "env": { - "GOOS": "linux", - "GOARCH": "386", - "GO386": "softfloat" - }, - "supported": true - }, - "mips64le": { - "env": { - "GOOS": "linux", - "GOARCH": "mips64le" - }, - "supported": true - }, - "ppc64le": { - "url": "https://dl.google.com/go/go1.20.14.linux-ppc64le.tar.gz", - "sha256": "237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd", - "env": { - "GOOS": "linux", - "GOARCH": "ppc64le" - }, - "supported": true - }, - "riscv64": { - "env": { - "GOOS": "linux", - "GOARCH": "riscv64" - }, - "supported": true - }, - "s390x": { - "url": "https://dl.google.com/go/go1.20.14.linux-s390x.tar.gz", - "sha256": "8d41fa5bcf78a7a2e8bff94d1ee27d6996a5c80884ccf4a4f7a9c785407b6d30", - "env": { - "GOOS": "linux", - "GOARCH": "s390x" - }, - "supported": true - }, - "src": { - "url": "https://dl.google.com/go/go1.20.14.src.tar.gz", - "sha256": "1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e", - "supported": true - }, - "windows-amd64": { - "url": "https://dl.google.com/go/go1.20.14.windows-amd64.zip", - "sha256": "0e0d0190406ead891d94ecf00f961bb5cfa15ddd47499d2649f12eee80aee110", - "env": { - "GOOS": "windows", - "GOARCH": "amd64" - }, - "supported": true - }, - "windows-arm64v8": { - "url": "https://dl.google.com/go/go1.20.14.windows-arm64.zip", - "sha256": "67dfb9de6c4775d3deffb3bf87c204f22b2d0ddebebc6eec5917a69e27af7370", - "env": { - "GOOS": "windows", - "GOARCH": "arm64" - }, - "supported": false - }, - "windows-i386": { - "url": "https://dl.google.com/go/go1.20.14.windows-386.zip", - "sha256": "ceaa0e7a7c89604027d67bbcce72b8574080d5c34b68bd3152338402c9253ce2", - "env": { - "GOOS": "windows", - "GOARCH": "386" - }, - "supported": false - } - }, - "variants": [ - "bookworm", - "bullseye", - "alpine3.19", - "alpine3.18", - "windows/windowsservercore-ltsc2022", - "windows/windowsservercore-1809", - "windows/nanoserver-ltsc2022", - "windows/nanoserver-1809" - ] - }, "1.21": { "version": "1.21.7", "arches": { @@ -563,12 +391,12 @@ "windows/nanoserver-1809" ] }, - "1.22-rc": { - "version": "1.22rc2", + "1.22": { + "version": "1.22.0", "arches": { "aix-ppc64": { - "url": "https://dl.google.com/go/go1.22rc2.aix-ppc64.tar.gz", - "sha256": "8893093ccc531dc1069c439ad8aaf1046dec54606355ade7a4554c85c210958c", + "url": "https://dl.google.com/go/go1.22.0.aix-ppc64.tar.gz", + "sha256": "190e105fc4133a8b5bb1492f368fa89aa4b729270441120714be7ee82e871ebc", "env": { "GOOS": "aix", "GOARCH": "ppc64" @@ -576,8 +404,8 @@ "supported": false }, "amd64": { - "url": "https://dl.google.com/go/go1.22rc2.linux-amd64.tar.gz", - "sha256": "f811e7ee8f6dee3d162179229f96a64a467c8c02a5687fac5ceaadcf3948c818", + "url": "https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz", + "sha256": "f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265", "env": { "GOOS": "linux", "GOARCH": "amd64", @@ -594,8 +422,8 @@ "supported": false }, "arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz", - "sha256": "2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709", + "url": "https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz", + "sha256": "0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4", "env": { "GOOS": "linux", "GOARCH": "arm", @@ -604,8 +432,8 @@ "supported": true }, "arm32v7": { - "url": "https://dl.google.com/go/go1.22rc2.linux-armv6l.tar.gz", - "sha256": "2b5b4ba2f116dcd147cfd3b1ec77efdcedff230f612bf9e6c971efb58262f709", + "url": "https://dl.google.com/go/go1.22.0.linux-armv6l.tar.gz", + "sha256": "0525f92f79df7ed5877147bce7b955f159f3962711b69faac66bc7121d36dcc4", "env": { "GOOS": "linux", "GOARCH": "arm", @@ -614,8 +442,8 @@ "supported": true }, "arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.linux-arm64.tar.gz", - "sha256": "bf18dc64a396948f97df79a3d73176dbaa7d69341256a1ff1067fd7ec5f79295", + "url": "https://dl.google.com/go/go1.22.0.linux-arm64.tar.gz", + "sha256": "6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10", "env": { "GOOS": "linux", "GOARCH": "arm64" @@ -623,8 +451,8 @@ "supported": true }, "darwin-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.darwin-amd64.tar.gz", - "sha256": "bea4e0a673ba7e93bac12420a48f041d0b05eeb2e24abdaddf59924df2755d48", + "url": "https://dl.google.com/go/go1.22.0.darwin-amd64.tar.gz", + "sha256": "ebca81df938d2d1047cc992be6c6c759543cf309d401b86af38a6aed3d4090f4", "env": { "GOOS": "darwin", "GOARCH": "amd64" @@ -632,8 +460,8 @@ "supported": false }, "darwin-arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.darwin-arm64.tar.gz", - "sha256": "96a2a5a9962ac54f9cc274b461cc5a85df3c7be67b5d1dd7b3c234ec1c85b3be", + "url": "https://dl.google.com/go/go1.22.0.darwin-arm64.tar.gz", + "sha256": "bf8e388b09134164717cd52d3285a4ab3b68691b80515212da0e9f56f518fb1e", "env": { "GOOS": "darwin", "GOARCH": "arm64" @@ -641,8 +469,8 @@ "supported": false }, "dragonfly-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.dragonfly-amd64.tar.gz", - "sha256": "250efc6be722666f695359c2b407edec544123a6cdee2e83be658059c589418b", + "url": "https://dl.google.com/go/go1.22.0.dragonfly-amd64.tar.gz", + "sha256": "357ab446200effa26c73ccaf3e8551426428950bf2490859fb296a09e53228b1", "env": { "GOOS": "dragonfly", "GOARCH": "amd64" @@ -650,8 +478,8 @@ "supported": false }, "freebsd-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.freebsd-amd64.tar.gz", - "sha256": "37b59014e34da71796c89c0b1ee615fcda3e1539fc0919d0204fff55b547b87e", + "url": "https://dl.google.com/go/go1.22.0.freebsd-amd64.tar.gz", + "sha256": "50f421c7f217083ac94aab1e09400cb9c2fea7d337679ec11f1638a11460da30", "env": { "GOOS": "freebsd", "GOARCH": "amd64" @@ -659,8 +487,8 @@ "supported": false }, "freebsd-arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.freebsd-arm.tar.gz", - "sha256": "d4fbb140f27ed36c6643fc6ef2d45adcd5a427ba6c736f348371631a31a9c66c", + "url": "https://dl.google.com/go/go1.22.0.freebsd-arm.tar.gz", + "sha256": "c9c8b305f90903536f4981bad9f029828c2483b3216ca1783777344fbe603f2d", "env": { "GOOS": "freebsd", "GOARCH": "armv6l" @@ -668,8 +496,8 @@ "supported": false }, "freebsd-arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.freebsd-arm64.tar.gz", - "sha256": "bf216059cea1407d089dc92aae7ade877cbaadb1394c7d50093bebd8c45f48d7", + "url": "https://dl.google.com/go/go1.22.0.freebsd-arm64.tar.gz", + "sha256": "e23385e5c640787fa02cd58f2301ea09e162c4d99f8ca9fa6d52766f428a933d", "env": { "GOOS": "freebsd", "GOARCH": "arm64" @@ -677,8 +505,8 @@ "supported": false }, "freebsd-i386": { - "url": "https://dl.google.com/go/go1.22rc2.freebsd-386.tar.gz", - "sha256": "1ac362f7c7d4558776c258c685c6fdc2f22bf1991abb02d96ca5a489c21e2a93", + "url": "https://dl.google.com/go/go1.22.0.freebsd-386.tar.gz", + "sha256": "b8065da37783e8b9e7086365a54d74537e832c92311b61101a66989ab2458d8e", "env": { "GOOS": "freebsd", "GOARCH": "386" @@ -686,8 +514,8 @@ "supported": false }, "freebsd-riscv64": { - "url": "https://dl.google.com/go/go1.22rc2.freebsd-riscv64.tar.gz", - "sha256": "5c40ae3a588c2dbcab81d680c52acbe6a8c88d993ed9c8e6d69bda87a93bb220", + "url": "https://dl.google.com/go/go1.22.0.freebsd-riscv64.tar.gz", + "sha256": "c8f94d1de6024546194d58e7b9370dc7ea06176aad94a675b0062c25c40cb645", "env": { "GOOS": "freebsd", "GOARCH": "riscv64" @@ -695,8 +523,8 @@ "supported": false }, "i386": { - "url": "https://dl.google.com/go/go1.22rc2.linux-386.tar.gz", - "sha256": "15321745f1e22a4930bdbf53c456c3aab42204c35c9a0dec4bbe1c641518e502", + "url": "https://dl.google.com/go/go1.22.0.linux-386.tar.gz", + "sha256": "1e209c4abde069067ac9afb341c8003db6a210f8173c77777f02d3a524313da3", "env": { "GOOS": "linux", "GOARCH": "386", @@ -705,8 +533,8 @@ "supported": true }, "illumos-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.illumos-amd64.tar.gz", - "sha256": "f0d5bce0bea46d72e827fa11b913ddc3010d6c6096bee36a80a823ad7d1c3a5c", + "url": "https://dl.google.com/go/go1.22.0.illumos-amd64.tar.gz", + "sha256": "d6792f11ad6ee5fc42d2fe51e1f1683471aa2ee4f20e3ad1be22a4afdbd38e7f", "env": { "GOOS": "illumos", "GOARCH": "amd64" @@ -714,8 +542,8 @@ "supported": false }, "loong64": { - "url": "https://dl.google.com/go/go1.22rc2.linux-loong64.tar.gz", - "sha256": "dda1faaca0c6cfd89d661ecda79b5ab25d1c6af1b42e15e88499e993d650e7dc", + "url": "https://dl.google.com/go/go1.22.0.linux-loong64.tar.gz", + "sha256": "b4b1d425cc113608452a32768469b6e34e538fd072bde9f508a75c8dbbdb843f", "env": { "GOOS": "linux", "GOARCH": "loong64" @@ -723,8 +551,8 @@ "supported": false }, "mips": { - "url": "https://dl.google.com/go/go1.22rc2.linux-mips.tar.gz", - "sha256": "84fdb35fc7c3790414553917ee3a02ce8d96403dc43b54949a3c9d977a28d907", + "url": "https://dl.google.com/go/go1.22.0.linux-mips.tar.gz", + "sha256": "ec0f9194df750c78492c02e4c70ffe6f3864f2511e47c894415320db752719f8", "env": { "GOOS": "linux", "GOARCH": "mips" @@ -732,8 +560,8 @@ "supported": false }, "mips64": { - "url": "https://dl.google.com/go/go1.22rc2.linux-mips64.tar.gz", - "sha256": "e5b67450b9f03150170a2504dd2f2a5f0b45f11df92c088f06b2d387ebf6e670", + "url": "https://dl.google.com/go/go1.22.0.linux-mips64.tar.gz", + "sha256": "47e938d215e4968ab42afb7307792e5e64184a717e8f176d0de7c411af96d63d", "env": { "GOOS": "linux", "GOARCH": "mips64" @@ -741,8 +569,8 @@ "supported": false }, "mips64le": { - "url": "https://dl.google.com/go/go1.22rc2.linux-mips64le.tar.gz", - "sha256": "d52d63c45b479ad31f44bdee2e5dfee9e2afce9d42a61c5ac453cb0214b6bd13", + "url": "https://dl.google.com/go/go1.22.0.linux-mips64le.tar.gz", + "sha256": "c162a1a516b8bc8839fc0c0283ad90f6b511e5aca3da4939ed4800f124b9e72c", "env": { "GOOS": "linux", "GOARCH": "mips64le" @@ -750,8 +578,8 @@ "supported": true }, "mipsle": { - "url": "https://dl.google.com/go/go1.22rc2.linux-mipsle.tar.gz", - "sha256": "bf1cc2913b0398a17d2dae40c9369a232a57e0250fe393695512923a59a65585", + "url": "https://dl.google.com/go/go1.22.0.linux-mipsle.tar.gz", + "sha256": "6ce3e9a06e3a8ca0312dc1f85046b6914c19852eba5393c5cbf26acf698f8977", "env": { "GOOS": "linux", "GOARCH": "mipsle" @@ -759,8 +587,8 @@ "supported": false }, "netbsd-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.netbsd-amd64.tar.gz", - "sha256": "c4eb6879e9027f152491e04c1e7aa7167c2d7177f77b90a873a57e8a44d62ef1", + "url": "https://dl.google.com/go/go1.22.0.netbsd-amd64.tar.gz", + "sha256": "b11995c271d2256dfe85cf54882ca3655e18c49c4d7db0502bff9977767894e7", "env": { "GOOS": "netbsd", "GOARCH": "amd64" @@ -768,8 +596,8 @@ "supported": false }, "netbsd-arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.netbsd-arm.tar.gz", - "sha256": "a18083e98e39523b09876f3b8b8799ece6d4cab79a26e8fb87fbb43cdd9875ce", + "url": "https://dl.google.com/go/go1.22.0.netbsd-arm.tar.gz", + "sha256": "b57a3aa9c862300ec0ee8609ce5e0f430f132044f351677fd34711a504081872", "env": { "GOOS": "netbsd", "GOARCH": "armv6l" @@ -777,8 +605,8 @@ "supported": false }, "netbsd-arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.netbsd-arm64.tar.gz", - "sha256": "2c9d128da32e0661f43ad7844013a4d5e9d0b71658af2425170daea2b40807be", + "url": "https://dl.google.com/go/go1.22.0.netbsd-arm64.tar.gz", + "sha256": "499918ccfedde78264d194244d251bf41d95cf606cc0adad13b36b8103cb974f", "env": { "GOOS": "netbsd", "GOARCH": "arm64" @@ -786,8 +614,8 @@ "supported": false }, "netbsd-i386": { - "url": "https://dl.google.com/go/go1.22rc2.netbsd-386.tar.gz", - "sha256": "cb52db0e81ea98494f2eca7b72ad4aed9d33a98ce0df3cd66fb32875a3c8dc90", + "url": "https://dl.google.com/go/go1.22.0.netbsd-386.tar.gz", + "sha256": "9b7e2dbd43a169bff18bf533a6c2f462eebe04126ab01c138d0d669c046e1658", "env": { "GOOS": "netbsd", "GOARCH": "386" @@ -795,8 +623,8 @@ "supported": false }, "openbsd-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.openbsd-amd64.tar.gz", - "sha256": "22fffbf9c2262ed23bf35e36a116988f1d9e3bda8b3059038dcd035d8da8f4d0", + "url": "https://dl.google.com/go/go1.22.0.openbsd-amd64.tar.gz", + "sha256": "ceb0c97ffc3bfaf74e1df843cb8571d7fc3173a08432f0f42112495df6a31520", "env": { "GOOS": "openbsd", "GOARCH": "amd64" @@ -804,8 +632,8 @@ "supported": false }, "openbsd-arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.openbsd-arm.tar.gz", - "sha256": "d563c9e33fcaba0a87a7bcef4385a661d75adba6d41dd8927d6b66ab721c4bb4", + "url": "https://dl.google.com/go/go1.22.0.openbsd-arm.tar.gz", + "sha256": "8af5aea3df539bc95ed412c0a176fe84baced70ea1dd29f4aa82d0e9ce27fd9f", "env": { "GOOS": "openbsd", "GOARCH": "armv6l" @@ -813,8 +641,8 @@ "supported": false }, "openbsd-arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.openbsd-arm64.tar.gz", - "sha256": "87600d5fbb82bf7808f20d65625311a269536a47a20a3ab80222824f3fb00247", + "url": "https://dl.google.com/go/go1.22.0.openbsd-arm64.tar.gz", + "sha256": "358801cab7122ab50d7d92727644f26d818e9e973403f09e85c2e935a625db75", "env": { "GOOS": "openbsd", "GOARCH": "arm64" @@ -822,8 +650,8 @@ "supported": false }, "openbsd-i386": { - "url": "https://dl.google.com/go/go1.22rc2.openbsd-386.tar.gz", - "sha256": "b9f0e7905d59384b6491a291d5504adcf9ab7cea964ed068c65f9047ff93a744", + "url": "https://dl.google.com/go/go1.22.0.openbsd-386.tar.gz", + "sha256": "379e0829104c18a139d78b33378e6bd3ab2e0792f6c43b4c38e7f20d8d77b99d", "env": { "GOOS": "openbsd", "GOARCH": "386" @@ -831,8 +659,8 @@ "supported": false }, "plan9-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.plan9-amd64.tar.gz", - "sha256": "972f9d50830dc5c790433877f1de3ef3776d89ff397b71ab9d472ffeea9cc6da", + "url": "https://dl.google.com/go/go1.22.0.plan9-amd64.tar.gz", + "sha256": "d8cf64f37a1dfd8e190c5a303c43ab2d49324868f098d88a3106072d137a5a0b", "env": { "GOOS": "plan9", "GOARCH": "amd64" @@ -840,8 +668,8 @@ "supported": false }, "plan9-arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.plan9-arm.tar.gz", - "sha256": "94a38ad7cab4a4bc46a30ec0836daee3f74098c3eec40aac36f0b2de3ea38178", + "url": "https://dl.google.com/go/go1.22.0.plan9-arm.tar.gz", + "sha256": "86fd6165f0cbb47ad551094f74b3e5a6c5e09de858d8b99de72d978d41be6e2a", "env": { "GOOS": "plan9", "GOARCH": "armv6l" @@ -849,8 +677,8 @@ "supported": false }, "plan9-i386": { - "url": "https://dl.google.com/go/go1.22rc2.plan9-386.tar.gz", - "sha256": "56c1ec2fc7b8bcd22847fa4b0b7ce27b123e529cacfbea2ab7503180931a53d5", + "url": "https://dl.google.com/go/go1.22.0.plan9-386.tar.gz", + "sha256": "fa42c545c9025c45ca9af176dc13a0f4af0cc26bacff6fcb35bb4a170ac538e8", "env": { "GOOS": "plan9", "GOARCH": "386" @@ -858,8 +686,8 @@ "supported": false }, "ppc64": { - "url": "https://dl.google.com/go/go1.22rc2.linux-ppc64.tar.gz", - "sha256": "3e15207f56128da89c13f1dfcc5080e0d97f615d7e697062cd912d89ed2f40c4", + "url": "https://dl.google.com/go/go1.22.0.linux-ppc64.tar.gz", + "sha256": "5ae23bf460731eb078f5700b01a50a303308b9f7174a2994892e28bf061f7c85", "env": { "GOOS": "linux", "GOARCH": "ppc64" @@ -867,8 +695,8 @@ "supported": false }, "ppc64le": { - "url": "https://dl.google.com/go/go1.22rc2.linux-ppc64le.tar.gz", - "sha256": "6f5aab8f36732d5d4b92ca6c96c9b8fa188b561b339740d52facab59a468c1e9", + "url": "https://dl.google.com/go/go1.22.0.linux-ppc64le.tar.gz", + "sha256": "0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93", "env": { "GOOS": "linux", "GOARCH": "ppc64le" @@ -876,8 +704,8 @@ "supported": true }, "riscv64": { - "url": "https://dl.google.com/go/go1.22rc2.linux-riscv64.tar.gz", - "sha256": "1b146b19a46a010e263369a72498356447ba0f71f608cb90af01729d00529f40", + "url": "https://dl.google.com/go/go1.22.0.linux-riscv64.tar.gz", + "sha256": "afe9cedcdbd6fdff27c57efd30aa5ce0f666f471fed5fa96cd4fb38d6b577086", "env": { "GOOS": "linux", "GOARCH": "riscv64" @@ -885,8 +713,8 @@ "supported": true }, "s390x": { - "url": "https://dl.google.com/go/go1.22rc2.linux-s390x.tar.gz", - "sha256": "12c9438147094fe33d99ee70d85c8fad1894b643aa0c6d355034fadac2fb7cfd", + "url": "https://dl.google.com/go/go1.22.0.linux-s390x.tar.gz", + "sha256": "2e546a3583ba7bd3988f8f476245698f6a93dfa9fe206a8ca8f85c1ceecb2446", "env": { "GOOS": "linux", "GOARCH": "s390x" @@ -894,8 +722,8 @@ "supported": true }, "solaris-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.solaris-amd64.tar.gz", - "sha256": "72cc0288552f0e49c6f23853f213e12fe884a7ed9231e1ba45601b80861fdf21", + "url": "https://dl.google.com/go/go1.22.0.solaris-amd64.tar.gz", + "sha256": "a6c12651768d3a74f16104502b4b7bef513ea6b646d99990a28d934c261d1689", "env": { "GOOS": "solaris", "GOARCH": "amd64" @@ -903,13 +731,13 @@ "supported": false }, "src": { - "url": "https://dl.google.com/go/go1.22rc2.src.tar.gz", - "sha256": "d193a87db8223821e1ee891edfee36c8eac9ba0cf83e42ede64795a7de8a7f27", + "url": "https://dl.google.com/go/go1.22.0.src.tar.gz", + "sha256": "4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c", "supported": true }, "windows-amd64": { - "url": "https://dl.google.com/go/go1.22rc2.windows-amd64.zip", - "sha256": "e311dc7a7f4d77ac4227cb463009dda2b8cdb33bc698e94e2222d63ecbb24b2b", + "url": "https://dl.google.com/go/go1.22.0.windows-amd64.zip", + "sha256": "78b3158fe3aa358e0b6c9f26ecd338f9a11441e88bc434ae2e9f0ca2b0cc4dd3", "env": { "GOOS": "windows", "GOARCH": "amd64" @@ -917,8 +745,8 @@ "supported": true }, "windows-arm32v6": { - "url": "https://dl.google.com/go/go1.22rc2.windows-arm.zip", - "sha256": "15032cf67271c04cece040f0c73f02dd2f074bdc163c1ff339f7f30642cf620a", + "url": "https://dl.google.com/go/go1.22.0.windows-arm.zip", + "sha256": "495c7dfaea4e2bf48643662bb622e4ce6378d6d9840015238ad4b8792b99ddbf", "env": { "GOOS": "windows", "GOARCH": "armv6l" @@ -926,8 +754,8 @@ "supported": false }, "windows-arm64v8": { - "url": "https://dl.google.com/go/go1.22rc2.windows-arm64.zip", - "sha256": "f434b4d554d7baf580fe0e7a52e2e122bf2848e1ccc4b47298e90271dd4c52bc", + "url": "https://dl.google.com/go/go1.22.0.windows-arm64.zip", + "sha256": "31a61e41d06a3bb2189a303f5f3e777ca4b454eff439f0a67bc2b166330021f4", "env": { "GOOS": "windows", "GOARCH": "arm64" @@ -935,8 +763,8 @@ "supported": false }, "windows-i386": { - "url": "https://dl.google.com/go/go1.22rc2.windows-386.zip", - "sha256": "cc282d682159284f20877b5d344b54e4ae44e26585780cbd5bd75bb8a8357f05", + "url": "https://dl.google.com/go/go1.22.0.windows-386.zip", + "sha256": "553d44928509965cbda02a45b35ab01cf8b925534bc526a34e2d9dc7794b57e8", "env": { "GOOS": "windows", "GOARCH": "386" diff --git a/versions.sh b/versions.sh index d257e24b..9ff757dd 100755 --- a/versions.sh +++ b/versions.sh @@ -132,7 +132,7 @@ for version in "${versions[@]}"; do .key as $bashbrewArch | .value.supported = ( # https://github.com/docker-library/golang/pull/500#issuecomment-1863578601 - as of Go 1.21+, we no longer build from source - (.value.url or ([ "1.20" ] | index(env.version | rtrimstr("-rc")))) + .value.url and ($potentiallySupportedArches | index($bashbrewArch)) ) | .value.env +=