Files
tokens-reef/backend/Dockerfile
Developer da36506b89 fix: resolve P0/P1 code quality issues
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
2026-03-31 11:39:18 +08:00

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"]