apk 删除
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m4s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m4s
This commit is contained in:
parent
c4604a2989
commit
a5a4412644
@ -4,7 +4,7 @@ FROM golang:1.21-alpine AS go-builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# 安装必要的构建工具
|
||||
RUN apk add gcc musl-dev
|
||||
# RUN apk add gcc musl-dev
|
||||
|
||||
# 设置 GOPROXY 环境变量
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
@ -13,7 +13,7 @@ ENV GOPROXY=https://goproxy.cn,direct
|
||||
COPY . .
|
||||
|
||||
# 构建 Go 服务
|
||||
RUN go build -o main ./main.go
|
||||
RUN CGO_ENABLED=0 go build -o main ./main.go
|
||||
|
||||
# 运行阶段
|
||||
FROM alpine:latest
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user