From aa545a2a9b141ed8340cfd039ebf1817fac3de1d Mon Sep 17 00:00:00 2001 From: lovezsh <1942314542@qq.com> Date: Mon, 26 Aug 2024 22:02:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84gol?= =?UTF-8?q?ang=E7=89=88=E6=9C=AC=E6=9E=84=E5=BB=BA=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..163b23a --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file