From 52375aeea7a67ca1223aacb3672f3ab3db5d0fd1 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 6 May 2022 10:25:22 +0200 Subject: [PATCH] prometheus-libvirt-exporter: fix build with newer Go I have no idea how Go works. This change make build happen. Change-Id: I09ea136c7354143f45f856d5e8d8ed1192879622 (cherry picked from commit 9630032fd61c6f0623bd1ae7577756e7166427f7) --- docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 index bcdcc7a56c..80e4028fe7 100644 --- a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 +++ b/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 @@ -33,8 +33,10 @@ ARG prometheus_libvirt_exporter_path=github.com/AlexZzz/libvirt-exporter {% block prometheus_libvirt_exporter_install %} ENV GOPATH=/build RUN go mod init libvirt-exporter \ + && cd ${GOPATH} \ && go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \ - && mv /build/bin/libvirt-exporter /opt \ + && go build ${prometheus_libvirt_exporter_path} \ + && mv /build/libvirt-exporter /opt \ && rm -rf /build {% endblock %}