From bbb66aa32212be550170bae5bfb7ab7119c849e0 Mon Sep 17 00:00:00 2001 From: Naga Ravi Chaitanya Elluri Date: Mon, 18 Jul 2022 13:05:59 -0400 Subject: [PATCH] Fix source to install azure-cli This commit updates Krkn source Dockerfile to copy azure client binary from the official azure-cli image instead of using package manager to avoid dependency issues. --- containers/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/containers/Dockerfile b/containers/Dockerfile index 3d5c08a2..04a69d2b 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -2,6 +2,8 @@ FROM quay.io/openshift/origin-tests:latest as origintests +FROM mcr.microsoft.com/azure-cli:latest as azure-cli + FROM quay.io/centos/centos:stream9 LABEL org.opencontainers.image.authors="Red Hat OpenShift Chaos Engineering" @@ -12,12 +14,13 @@ ENV KUBECONFIG /root/.kube/config COPY --from=origintests /usr/bin/oc /usr/bin/oc COPY --from=origintests /usr/bin/kubectl /usr/bin/kubectl +# Copy azure client binary from azure-cli image +COPY --from=azure-cli /usr/local/bin/az /usr/bin/az + # Install dependencies RUN yum install epel-release -y && \ yum install -y git python python3-pip jq gettext && \ python3 -m pip install -U pip && \ - rpm --import https://packages.microsoft.com/keys/microsoft.asc && \ - echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo && yum install -y azure-cli && \ git clone https://github.com/openshift-scale/kraken /root/kraken && \ mkdir -p /root/.kube && cd /root/kraken && \ pip3 install -r requirements.txt