From ab679adcbfaa251b2de00daa0acdbb7771a8ae04 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 9 Jan 2019 16:42:17 +0100 Subject: debian/ubuntu: introduce 'debian_arch' variable Many images have 'if x86_64 then amd64 elif aarch64 then arm64' check to comply with Debian like architecture names in several projects. This patch creates 'debian_arch' variable which can be used in all Docker files (similar to 'base_arch' one). All required images got converted to use it. Change-Id: I9c5e6f13d6c9b24fe323408512bd5aef290111ad --- docker/helm-repository/Dockerfile.j2 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'docker/helm-repository') diff --git a/docker/helm-repository/Dockerfile.j2 b/docker/helm-repository/Dockerfile.j2 index 4faa76c31..dc20229b8 100644 --- a/docker/helm-repository/Dockerfile.j2 +++ b/docker/helm-repository/Dockerfile.j2 @@ -46,20 +46,12 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ RUN {{ macros.install_pip(helm_repository_pip_packages | customizable("pip_packages"), constraints = false) }} -{% if base_arch == 'x86_64' %} -ENV helm_arch=amd64 -{% elif base_arch == 'aarch64' %} -ENV helm_arch=arm64 -{% else %} -ENV helm_arch={{ base_arch }} -{% endif %} - {% block helm_repository_install_kubernetes_helm %} # TODO(mandre) check for file integrity instead of downloading from an HTTPS source -RUN curl -Lo /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v${helm_version}-linux-${helm_arch}.tar.gz \ - && sudo tar --strip-components 1 -C /usr/bin linux-${helm_arch}/helm -zxvf /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz \ +RUN curl -Lo /tmp/helm-v${helm_version}-linux-{{debian_arch}}.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v${helm_version}-linux-{{debian_arch}}.tar.gz \ + && sudo tar --strip-components 1 -C /usr/bin linux-{{debian_arch}}/helm -zxvf /tmp/helm-v${helm_version}-linux-{{debian_arch}}.tar.gz \ && sudo chmod 755 /usr/bin/helm \ - && rm /tmp/helm-v${helm_version}-linux-${helm_arch}.tar.gz + && rm /tmp/helm-v${helm_version}-linux-{{debian_arch}}.tar.gz {% endblock %} RUN useradd --user-group --create-home --home-dir /home/helm helm \ -- cgit v1.2.3