P0 fixes: - ModelError.Is(): use exact matching instead of substring contains() - shouldClearStickySession: add context param for cancellation/tracing P1 fixes: - TODO stubs: return 501 Not Implemented errors - validateInstanceSignature: deduplicate to shared validateCodeSignature() - Error messages: standardize to English only - http.go: remove pseudo if-else with duplicate branches
25 lines
313 B
Docker
25 lines
313 B
Docker
FROM golang:1.25.7-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# 安装必要的工具
|
|
RUN apk add --no-cache git
|
|
|
|
# 复制go.mod和go.sum
|
|
COPY go.mod go.sum ./
|
|
|
|
# 下载依赖
|
|
RUN go mod download
|
|
|
|
# 复制源代码
|
|
COPY . .
|
|
|
|
# 构建应用
|
|
RUN go build -o main ./cmd/server/
|
|
|
|
# 暴露端口
|
|
EXPOSE 8080
|
|
|
|
# 运行应用
|
|
CMD ["./main"]
|