fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
cjy 2025-12-15 10:19:57 +08:00
parent e5a0e89eeb
commit dffab92ff6

View File

@ -4,7 +4,17 @@ LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
WORKDIR /build
COPY micro-ayrshare /app/micro-ayrshare
# 复制 Go 模块文件
COPY go.mod go.sum ./
# 下载依赖
RUN go mod download
# 复制源代码
COPY . .
# 编译 Go 程序
RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /app/micro-ayrshare ./cmd
#FROM 172.16.100.99:9006/alpine
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories