From 6ae17cf6782957e6e17717c1481ac8c2b54df794 Mon Sep 17 00:00:00 2001 From: Naga Ravi Chaitanya Elluri Date: Wed, 3 Jul 2024 14:37:55 -0400 Subject: [PATCH] Update dockerfile to install azure-cli using dnf Avoids architecture issues such as "bash: /usr/bin/az: cannot execute: required file not found" Signed-off-by: Naga Ravi Chaitanya Elluri --- containers/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/containers/Dockerfile b/containers/Dockerfile index 612235c0..98915a33 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -1,5 +1,3 @@ -# azure-client -FROM mcr.microsoft.com/azure-cli:latest as azure-cli # oc build FROM golang:1.22.4 AS oc-build RUN apt-get update && apt-get install -y libkrb5-dev @@ -30,8 +28,9 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s # This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo RUN dnf update && dnf install -y git python39 jq yq gettext wget which -# copy azure client binary from azure-cli image -COPY --from=azure-cli /usr/local/bin/az /usr/bin/az + +# Install azure cli +RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm && dnf install -y azure-cli # copy oc client binary from oc-build image COPY --from=oc-build /tmp/oc/oc /usr/bin/oc