From 01ef4236b432001de9e8432614295cd44d953c6f Mon Sep 17 00:00:00 2001 From: XOF Date: Sun, 14 Dec 2025 21:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Dockerfile?= 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..1f4589b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.25-alpine AS builder +WORKDIR /build +COPY main.go . +RUN go build -ldflags="-s -w" -o app main.go + +FROM alpine:latest +WORKDIR /app +COPY --from=builder /build/app . +RUN chmod +x app +EXPOSE 8080 +CMD ["./app"]