whats_this / Dockerfile
sanbo
update sth. at 2024-12-19 16:45:47
39ea0b7
raw
history blame contribute delete
340 Bytes
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"]