18 Star 75 Fork 9

Gitee 极速下载/GoPlus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/qiniu/goplus
克隆/下载
Dockerfile 863 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aofei Sheng 提交于 2024-03-15 14:49 . Introduce official Docker image
ARG BASE_IMAGE=golang:1.22-bookworm
FROM $BASE_IMAGE AS build
ARG USE_GORELEASER_ARTIFACTS=0
WORKDIR /usr/local/src/gop
COPY . .
ENV GOPROOT=/usr/local/gop
RUN set -eux; \
mkdir -p $GOPROOT/bin; \
git ls-tree --full-tree --name-only -r HEAD | grep -vE "^\." | xargs -I {} cp --parents {} $GOPROOT/; \
if [ $USE_GORELEASER_ARTIFACTS -eq 1 ]; then \
GOARCH=$(go env GOARCH); \
BIN_DIR_SUFFIX=linux_$GOARCH; \
[ $GOARCH = "amd64" ] && BIN_DIR_SUFFIX=${BIN_DIR_SUFFIX}_v1; \
[ $GOARCH = "arm" ] && BIN_DIR_SUFFIX=${BIN_DIR_SUFFIX}_$(go env GOARM | cut -d , -f 1); \
cp .dist/gop_$BIN_DIR_SUFFIX/bin/gop .dist/gopfmt_$BIN_DIR_SUFFIX/bin/gopfmt $GOPROOT/bin/; \
else \
./all.bash; \
cp bin/gop bin/gopfmt $GOPROOT/bin/; \
fi
FROM $BASE_IMAGE
ENV GOPROOT=/usr/local/gop
COPY --from=build $GOPROOT/ $GOPROOT/
ENV PATH=$GOPROOT/bin:$PATH
WORKDIR /gop
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mirrors/GoPlus.git
git@gitee.com:mirrors/GoPlus.git
mirrors
GoPlus
GoPlus
main

搜索帮助