init
This commit is contained in:
20
xiangj-adapter/Dockerfile
Normal file
20
xiangj-adapter/Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user