diff options
| author | Maksim Malchuk <maksim.malchuk@gmail.com> | 2020-12-16 21:26:56 +0300 |
|---|---|---|
| committer | Maksim Malchuk <maksim.malchuk@gmail.com> | 2022-03-11 15:58:05 +0300 |
| commit | 83efe325462e683e2c99d088012cd611d7a0b138 (patch) | |
| tree | fa3d965238b19b976c705fd8c4ec68bd4ff945d3 /docker/prometheus/prometheus-cadvisor | |
| parent | 5bb6489922aab2b431be8f121465eb7f3a49b5ae (diff) | |
| download | kolla-83efe325462e683e2c99d088012cd611d7a0b138.tar.gz kolla-83efe325462e683e2c99d088012cd611d7a0b138.zip | |
Unify curl use (customisation options)
This change adds and unifies an ability to override hardcoded URLs for
air-gapped environments via the usual blocks mechanism. Also, this
change replaces ENV with ARG instruction for the variables used only
in building images, and uses bash variable expansion where it possible.
This change is a continuation of the I46b77978926fc2b578a68d1aaa944b2198af0685
Change-Id: I1fbad333b1bc95484e6f4c5145d5936a0e2db84f
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
Diffstat (limited to 'docker/prometheus/prometheus-cadvisor')
| -rw-r--r-- | docker/prometheus/prometheus-cadvisor/Dockerfile.j2 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 b/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 index 2f4e5563f..d337d9aa2 100644 --- a/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 +++ b/docker/prometheus/prometheus-cadvisor/Dockerfile.j2 @@ -8,14 +8,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} {% block prometheus_cadvisor_repository_version %} -ENV prometheus_cadvisor_version=0.38.7 -ENV prometheus_cadvisor_sha256sum=fdb86c256df682cfec2abd57a4405c919ed26f1e27ebfabf487f6c516bc7f6c7 +ARG prometheus_cadvisor_version=0.38.7 +ARG prometheus_cadvisor_sha256sum=fdb86c256df682cfec2abd57a4405c919ed26f1e27ebfabf487f6c516bc7f6c7 +ARG prometheus_cadvisor_url=https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor {% endblock %} {% if base_arch in ['x86_64'] %} {% block prometheus_cadvisor_install %} -RUN curl -o /tmp/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor \ +RUN curl -o /tmp/cadvisor ${prometheus_cadvisor_url} \ && echo "${prometheus_cadvisor_sha256sum} /tmp/cadvisor" | sha256sum -c \ && mv /tmp/cadvisor /opt \ && chmod 0755 /opt/cadvisor |
