4 Star 2 Fork 0

openKylin/openkylin-docker-images

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
张瑞安 提交于 2026-03-06 17:44 +08:00 . upload picoclaw
ARG BASE=openkylin/openkylin:2.0
FROM ${BASE}
ARG TARGETARCH
ARG LOCAL_PATH=/usr/local
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV GOLANG_VERSION=1.26.1
ENV GOROOT=${LOCAL_PATH}/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
RUN set -eux; \
apt-get update && \
apt-get install -y build-essential libc6-dev curl pkg-config findutils && apt-get clean && rm -rf /var/lib/apt/lists/*; \
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"; \
apt remove build-essential libc6-dev pkg-config findutils; \
apt clean all
WORKDIR $GOPATH
CMD ["go", "version"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openkylin/openkylin-docker-images.git
git@gitee.com:openkylin/openkylin-docker-images.git
openkylin
openkylin-docker-images
openkylin-docker-images
master

搜索帮助