FROM golang:1.26-alpine AS builder WORKDIR /app ENV GOPROXY=https://goproxy.cn,direct \ GOSUMDB=sum.golang.google.cn COPY go.mod go.sum ./ RUN go mod download COPY cmd ./cmd COPY docs ./docs COPY internal ./internal RUN CGO_ENABLED=0 GOOS=linux go build -o /out/authserver ./cmd/server FROM alpine:3.22 RUN apk add --no-cache ca-certificates tzdata WORKDIR /authserver/backend COPY --from=builder /out/authserver /usr/local/bin/authserver EXPOSE 8083 CMD ["authserver"]