File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,11 @@ RUN if [ "$INSTALL_JS" = "true" ]; then \
102102
103103# Install Go if requested
104104RUN if [ "$INSTALL_GO" = "true" ]; then \
105- curl -OL https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz \
106- && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
107- && rm go${GO_VERSION}.linux-amd64.tar.gz \
105+ GO_DOWNLOAD_VERSION="${GO_VERSION}" \
106+ && case "${GO_DOWNLOAD_VERSION}" in *.*.*) ;; *.*) GO_DOWNLOAD_VERSION="${GO_DOWNLOAD_VERSION}.0" ;; esac \
107+ && curl -fsSLO "https://go.dev/dl/go${GO_DOWNLOAD_VERSION}.linux-amd64.tar.gz" \
108+ && tar -C /usr/local -xzf "go${GO_DOWNLOAD_VERSION}.linux-amd64.tar.gz" \
109+ && rm "go${GO_DOWNLOAD_VERSION}.linux-amd64.tar.gz" \
108110 && echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/bash.bashrc \
109111 && echo "export PATH=$PATH:/root/go/bin" >> /etc/bash.bashrc \
110112 && /usr/local/go/bin/go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; \
You can’t perform that action at this time.
0 commit comments