This commit is contained in:
madaoxs
2026-01-13 17:55:36 +08:00
commit e348e845f2
14 changed files with 700 additions and 0 deletions

20
xiangj-adapter/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM golang:1.25 AS builder
WORKDIR /app
ENV GOPROXY=https://goproxy.cn,direct
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o /app/server ./cmd/server
RUN mkdir -p /app/log
FROM gcr.io/distroless/base-debian12
WORKDIR /app
COPY --from=builder /app/server /app/server
COPY --from=builder /app/config.yaml /app/config.yaml
COPY --from=builder /app/log /app/log
EXPOSE 21056
ENTRYPOINT ["/app/server"]
CMD ["-config", "/app/config.yaml"]