FROM golang:1.22-bullseye AS Builder ENV GOPROXY=https://goproxy.cn ENV CGO_ENABLED=0 WORKDIR /app RUN apt-get update && \ apt-get install -y git && \ git clone https://github.com/soulteary/webhook.git && \ cd webhook && \ go mod download -x && \ go build -ldflags "-w -s" -o webhook . FROM debian:stable-slim WORKDIR /app COPY --from=Builder /app/webhook/webhook . RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ netbase \ && rm -rf /var/lib/apt/lists/ \ && apt-get autoremove -y && apt-get autoclean -y CMD ["./webhook"]