add docker build

This commit is contained in:
daniel 2026-04-01 21:48:17 +08:00
parent 0844302460
commit c7e71cb8c8
2 changed files with 2 additions and 3 deletions

View File

@ -1,11 +1,10 @@
# ── Stage 1: 編譯 ───────────────────────────────────────────── # ── Stage 1: 編譯 ─────────────────────────────────────────────
FROM golang:1.24-alpine AS builder FROM golang:1.25-alpine AS builder
WORKDIR /build WORKDIR /build
COPY go.mod go.sum ./ COPY go.mod go.sum ./
# 臨時降版 go directive 以符合 1.24 編譯器,不修改原始 go.mod RUN go mod download
RUN go mod edit -go=1.24 && go mod download
COPY . . COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o cursor-api-proxy . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o cursor-api-proxy .

BIN
cursor-api-proxy Executable file

Binary file not shown.