FROM golang:1.22-alpine AS builder ARG HTTP_PROXY=http://192.168.31.55:10809 ARG HTTPS_PROXY=http://192.168.31.55:10809 ARG GO111MODULE=on ARG GOPROXY=https://goproxy.cn WORKDIR /proxy-detector-src COPY . /proxy-detector-src RUN go mod download && \ go mod tidy && \ go build -o ./bin/proxy-detector && \ mv ./bin/proxy-detector /proxy-detector FROM alpine:latest ARG HTTP_PROXY=http://192.168.31.55:10809 ARG HTTPS_PROXY=http://192.168.31.55:10809 RUN apk add --no-cache ca-certificates tzdata WORKDIR /proxy-detector-src COPY ./config /proxy-detector-src/config COPY --from=builder /proxy-detector /proxy-detector-src/ ENTRYPOINT ["/proxy-detector-src/proxy-detector", "-d"]