Skip to content

Commit 4d9a4f1

Browse files
authored
install Go the official way (#14149)
Signed-off-by: Adam Korczynski <[email protected]>
1 parent c12c5be commit 4d9a4f1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

infra/base-images/base-runner/install_go.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@
2020
case $(uname -m) in
2121
x86_64)
2222
# Download and install Go.
23-
wget -q https://storage.googleapis.com/golang/getgo/installer_linux -O $SRC/installer_linux
24-
chmod +x $SRC/installer_linux
25-
SHELL="bash" $SRC/installer_linux -version 1.25.0
26-
rm $SRC/installer_linux
23+
export GOROOT=/root/.go
24+
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz
25+
mkdir temp-go
26+
tar -C temp-go/ -xzf go1.25.0.linux-amd64.tar.gz
27+
28+
mkdir $GOROOT
29+
mv temp-go/go/* /root/.go/
30+
rm -rf temp-go
31+
32+
echo 'Set "GOPATH=/root/go"'
33+
echo 'Set "PATH=$PATH:/root/.go/bin:$GOPATH/bin"'
2734
# Set up Golang coverage modules.
2835
printf $(find . -name gocoverage)
2936
cd $GOPATH/gocoverage && /root/.go/bin/go install ./...

0 commit comments

Comments
 (0)