From f292559663282096399395e519d2ddf7b5cbe3f5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Aug 2023 10:45:50 +0200 Subject: [PATCH] Dockerfile: Windows: update Golang download domains to cut down redirects The `golang.org` domain moved to `go.dev`, and the download-URLs we were using resulted in 2 redirects; curl -sI https://golang.org/dl/go1.20.windows-amd64.zip | grep 'location' location: https://go.dev/dl/go1.20.windows-amd64.zip curl -sI https://go.dev/dl/go1.20.windows-amd64.zip | grep 'location' location: https://dl.google.com/go/go1.20.windows-amd64.zip curl -sI https://dl.google.com/go/go1.20.windows-amd64.zip HTTP/2 200 # ... This patch cuts it down to one redirects. I decided not to use the "final" (`dl.google.com`) URL, because that URL is not documented in the Golang docs, and visiting the domain itself (https://dl.google.com/) redirects to a marketing page for "Google Chrome". Trying the `/go/` path (https://dl.google.com/go/) also does not show a landing page that lists downloads, so I'm considering those URLs to be "unstable". Signed-off-by: Sebastiaan van Stijn (cherry picked from commit f6a5318f9411ae26bb6d7335b36505c83bbc21b9) Signed-off-by: Sebastiaan van Stijn --- Dockerfile.windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index 3351342372..0572859dfb 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -224,7 +224,7 @@ RUN ` ` Write-Host INFO: Downloading go...; ` $dlGoVersion=$Env:GO_VERSION -replace '\.0$',''; ` - Download-File "https://golang.org/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; ` + Download-File "https://go.dev/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; ` ` Write-Host INFO: Downloading compiler 1 of 3...; ` Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/gcc.zip C:\gcc.zip; `