我正在尝试使用https://github.com/devinotelecom/prometheus-vmware-exporter通过prometheus监控esxi到grafana
当我跑步的时候
[root@admin01 prometheus-vmware-exporter]# docker build -t prometheus-vmware-exporter .
Sending build context to Docker daemon 157.7kB
Step 1/9 : FROM golang:1.11 as builder
---> 43a154fee764
Step 2/9 : WORKDIR /src/github.com/devinotelecom/prometheus-vmware-exporter
---> Using cache
---> 6b2aad4c7a43
Step 3/9 : COPY ./ /src/github.com/devinotelecom/prometheus-vmware-exporter
---> Using cache
---> 2f5f1b155f7f
Step 4/9 : RUN go get -d -v
---> Using cache
---> a48d35b3d5e2
Step 5/9 : RUN CGO_ENABLED=0 GOOS=linux go build
---> Running in 86199cee4fcb
# github.com/prometheus/client_golang/prometheus
/go/src/github.com/prometheus/client_golang/prometheus/build_info_collector.go:24:15: undefined: debug.ReadBuildInfo
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux go build' returned a non-zero code: 2
[root@admin01 prometheus-vmware-exporter]# 感谢您在高级方面的帮助
发布于 2022-03-09 08:49:40
prometheus中最小的golang版本是1.15,但在Dockerfile中它写的是1.11
来源:https://github.com/prometheus/client_golang/blob/main/go.mod
在Dockerfile中尝试将golang:1.11更改为golang:1.15++
https://stackoverflow.com/questions/71405350
复制相似问题