Spaces:
Running
Running
FROM golang:1.22 AS builder | |
ENV CGO_ENABLED=0 | |
WORKDIR /app | |
COPY go.mod go.sum ./ | |
RUN go mod download | |
COPY . . | |
RUN CGO_ENABLED=0 GOARCH=amd64 go build -o ddg . | |
FROM alpine:latest | |
WORKDIR /app | |
COPY --from=builder /app/ddg . | |
ENV MAX_RETRY_COUNT="3" | |
ENV RETRY_DELAY="5000" | |
ENV PORT="7860" | |
EXPOSE 7860 | |
RUN chmod +x ddg | |
CMD ["./ddg"] | |