Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0 backport] Dockerfile: Windows: update Golang download domains to cut down redirects #46325

Merged
merged 2 commits into from Aug 25, 2023

Conversation

thaJeztah
Copy link
Member


hack: update link to GOPATH documentation

This documentation moved to a different page, and the Go documentation
moved to the https://go.dev/ domain.

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".

- A picture of a cute animal (not mandatory but encouraged)

This documentation moved to a different page, and the Go documentation
moved to the https://go.dev/ domain.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2aabd64)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…ects

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 <github@gone.nl>
(cherry picked from commit f6a5318)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit 7741a89 into moby:24.0 Aug 25, 2023
102 checks passed
@thaJeztah thaJeztah deleted the 24.0_backport_hack_less_redirects branch August 25, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants