21 Star 72 Fork 73

openEuler/openeuler-docker-images
Closed

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
Dockerfile 1.10 KB
Copy Edit Raw Blame History
openeuler_bot authored 2025-11-06 08:17 +08:00 . 24.03-lts-sp2 update go to 1.25.4
ARG BASE=openeuler/openeuler:24.03-lts-sp2
FROM ${BASE}
ARG TARGETARCH
ARG LOCAL_PATH=/usr/local
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV GOLANG_VERSION=1.25.4
ENV GOROOT=${LOCAL_PATH}/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN set -eux; \
yum update -y && yum -y install g++ gcc glibc-devel make pkg-config findutils && yum clean all; \
curl -fSL -o ${LOCAL_PATH}/go.tar.gz https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz; \
tar -xvf ${LOCAL_PATH}/go.tar.gz -C ${LOCAL_PATH}; \
rm -f ${LOCAL_PATH}/go.tar.gz
RUN set -eux; \
find ${GOROOT}/src -exec touch -r ${GOROOT}/VERSION "{}" \; && \
touch ${GOROOT}/pkg; \
find ${GOROOT}/pkg -exec touch -r ${GOROOT}/pkg "{}" \; && \
mkdir -p ${GOROOT}/bin/linux_${TARGETARCH}; \
ln -sf ${GOROOT}/bin/go ${GOROOT}/bin/linux_${TARGETARCH}/go; \
ln -sf ${GOROOT}/bin/gofmt ${GOROOT}/bin/linux_${TARGETARCH}/gofmt
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin"; \
chmod -R 1777 "$GOPATH"; \
yum -y remove g++ gcc glibc-devel make pkg-config findutils; \
yum clean all
WORKDIR $GOPATH
CMD ["go", "version"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/openeuler-docker-images.git
git@gitee.com:openeuler/openeuler-docker-images.git
openeuler
openeuler-docker-images
openeuler-docker-images
master

Search