重新编译influxdb_exporter源码,构建镜像

1.github

https://github.com/prometheus/influxdb_exporter

 

2.dockerfile

FROM golang:1.17
ENV GO111MODULE=on \
    GOPROXY="https://goproxy.cn,direct"
COPY influxdb_exporter-0.9.1 /apps/influxdb_exporter-0.9.1
WORKDIR /apps/influxdb_exporter-0.9.1
RUN make build
RUN cp /apps/influxdb_exporter-0.9.1/influxdb_exporter-0.9.1 /bin/influxdb_exporter
WORKDIR /apps/influxdb_exporter-0.9.1
EXPOSE      9122
ENTRYPOINT  [ "/bin/influxdb_exporter" ]

 

posted @ 2022-08-28 18:17  wdgde  阅读(170)  评论(0)    收藏  举报