enhance: upgrade amazonlinux2023 builder image go version to 1.21 (#33176)

Signed-off-by: shaoting-huang [shaoting-huang@zilliz.com]

issue: https://github.com/milvus-io/milvus/issues/32982

Go 1.21 introduces several improvements and changes over Go 1.20, which
is quite stable now. This PR is mainly for upgrading images Golang
version from 1.20 to 1.21.

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
This commit is contained in:
shaoting-huang 2024-05-20 21:11:39 +08:00 committed by GitHub
parent 7eeb120aab
commit d27db99697
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,10 +14,19 @@ FROM amazonlinux:2023
ARG TARGETARCH
RUN dnf install -y wget g++ gcc gdb libatomic libstdc++-static ninja-build git make zip unzip tar which \
autoconf automake golang python3 python3-pip perl-FindBin texinfo \
autoconf automake python3 python3-pip perl-FindBin texinfo \
pkg-config libuuid-devel libaio perl-IPC-Cmd libasan openblas-devel && \
rm -rf /var/cache/yum/*
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.21.10.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN pip3 install conan==1.61.0
RUN echo "target arch $TARGETARCH"