proxy-detector/Dockerfile
timerzz f9ebc0b91b
Some checks failed
Build image / build (push) Has been cancelled
feat 修改构建使用的镜像
2024-12-10 10:48:36 +08:00

21 lines
690 B
Docker

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"]