apk 删除
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m4s

This commit is contained in:
Song367 2025-12-27 19:11:55 +08:00
parent c4604a2989
commit a5a4412644

View File

@ -4,7 +4,7 @@ FROM golang:1.21-alpine AS go-builder
WORKDIR /usr/src/app WORKDIR /usr/src/app
# 安装必要的构建工具 # 安装必要的构建工具
RUN apk add gcc musl-dev # RUN apk add gcc musl-dev
# 设置 GOPROXY 环境变量 # 设置 GOPROXY 环境变量
ENV GOPROXY=https://goproxy.cn,direct ENV GOPROXY=https://goproxy.cn,direct
@ -13,7 +13,7 @@ ENV GOPROXY=https://goproxy.cn,direct
COPY . . COPY . .
# 构建 Go 服务 # 构建 Go 服务
RUN go build -o main ./main.go RUN CGO_ENABLED=0 go build -o main ./main.go
# 运行阶段 # 运行阶段
FROM alpine:latest FROM alpine:latest