aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2022-05-06 10:25:22 +0200
committerMarcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org>2022-05-06 10:25:22 +0200
commit9630032fd61c6f0623bd1ae7577756e7166427f7 (patch)
tree10114682e7095d569fde83d5f3031aeece99dbcd /docker
parentb418bd8592f48980cb6c4875c5827b42c0b136a4 (diff)
downloadkolla-9630032fd61c6f0623bd1ae7577756e7166427f7.tar.gz
kolla-9630032fd61c6f0623bd1ae7577756e7166427f7.zip
prometheus-libvirt-exporter: fix build with newer Go
I have no idea how Go works. This change make build happen. Change-Id: I09ea136c7354143f45f856d5e8d8ed1192879622
Diffstat (limited to 'docker')
-rw-r--r--docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2
index 84c8c7754..0e8806fdf 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 %}