|
|
|
FROM golang AS builder |
|
|
|
|
|
ENV GO111MODULE=on \ |
|
CGO_ENABLED=0 \ |
|
GOOS=linux |
|
|
|
|
|
WORKDIR /build |
|
|
|
|
|
COPY go.mod go.sum ./ |
|
|
|
RUN go mod download |
|
|
|
|
|
RUN apk add git && git clone https://github.com/deanxv/coze-discord-proxy.git . |
|
RUN sed -i 's/router.Group("/v1")/router.Group("/api/v1")/' /router/api-router.go |
|
RUN go build -o /coze-discord-proxy |
|
|
|
|
|
FROM alpine |
|
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata |
|
|
|
|
|
COPY --from=builder /coze-discord-proxy . |
|
|
|
|
|
EXPOSE 7077 |
|
|
|
WORKDIR /app/coze-discord-proxy/data |
|
|
|
ENTRYPOINT ["/coze-discord-proxy"] |