chore(docker): 优化构建环境变量设置
- 移除旧的 GOPROXY 环境变量设置 - 添加 CGO_ENABLED=0 配置以禁用 CGO - 设置目标操作系统为 linux - 设置目标架构为 amd64
This commit is contained in:
@@ -7,8 +7,7 @@ WORKDIR /build
|
||||
COPY .. /build/
|
||||
|
||||
# 根据USE_PROXY参数设置环境变量
|
||||
RUN export GOPROXY=https://goproxy.cn,direct; \
|
||||
export GO111MODULE=on \
|
||||
RUN export GO111MODULE=on \
|
||||
&& export CGO_ENABLED=0 \
|
||||
&& export GOOS=linux \
|
||||
&& export GOARCH=amd64 \
|
||||
|
||||
Reference in New Issue
Block a user