feat: 使用新的golang版本构建镜像
This commit is contained in:
parent
bfd7729e09
commit
aa545a2a9b
|
@ -0,0 +1,11 @@
|
||||||
|
FROM golang:1.22.4-alpine3.20 as builder
|
||||||
|
|
||||||
|
WORKDIR /builder
|
||||||
|
COPY . .
|
||||||
|
RUN GOPROXY=https://goproxy.cn CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o nip cmd/main.go
|
||||||
|
|
||||||
|
|
||||||
|
FROM alpine:3.20
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /builder/nip .
|
||||||
|
ENTRYPOINT [ "/app/nip" ]
|
Loading…
Reference in New Issue