1.github
https://github.com/danielqsj/kafka_exporter
2.dockerfile
FROM golang:1.17
ENV GO111MODULE=on /
GOPROXY="https://goproxy.cn,direct"
COPY kafka_exporter-1.4.2 /apps/kafka_exporter-1.4.2
WORKDIR /apps/kafka_exporter-1.4.2
RUN make
RUN cp /apps/kafka_exporter-1.4.2/kafka_exporter-1.4.2 /bin/kafka_exporter
WORKDIR /bin
EXPOSE 9308
ENTRYPOINT [ "/bin/kafka_exporter" ]
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/282751.html