From 4dd0d6aff28f7976088ec389ffd525e2372e6bc6 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Thu, 23 Jul 2026 18:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6:=20xy=5Fsh?= =?UTF-8?q?/Dockerfile.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xy_sh/Dockerfile.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 xy_sh/Dockerfile.go diff --git a/xy_sh/Dockerfile.go b/xy_sh/Dockerfile.go new file mode 100644 index 0000000..57524ee --- /dev/null +++ b/xy_sh/Dockerfile.go @@ -0,0 +1,15 @@ +dockerfile +FROM golang:1.23-alpine AS builder + +WORKDIR /app +COPY go.mod go.sum ./ +RUN go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -o /server ./cmd/server + +FROM alpine:3.19 +RUN apk --no-cache add ca-certificates tzdata +WORKDIR /app +COPY --from=builder /server . +EXPOSE 8080 +CMD ["./server"] \ No newline at end of file