21 Star 72 Fork 73

openEuler/openeuler-docker-images
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
baigj 提交于 2025-03-24 12:35 +08:00 . update: container image classification
ARG BASE=openeuler/openeuler:22.03-lts-sp1
FROM ${BASE}
ARG TARGETARCH
ARG LOCAL_PATH=/usr/local
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV GOLANG_VERSION=1.24.0
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

搜索帮助