From f339a0ae026c19ba75124830969d59ff2d451e31 Mon Sep 17 00:00:00 2001 From: Johnny Liu Date: Mon, 15 Aug 2022 12:11:42 +0800 Subject: [PATCH] Download yq in upi installer containers --- images/installer/Dockerfile.upi.ci | 7 +++++++ images/installer/Dockerfile.upi.ci.rhel8 | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/images/installer/Dockerfile.upi.ci b/images/installer/Dockerfile.upi.ci index 646d162a4f1..e6586e9f9d5 100644 --- a/images/installer/Dockerfile.upi.ci +++ b/images/installer/Dockerfile.upi.ci @@ -38,6 +38,13 @@ RUN yum update -y && \ rm -rf /var/cache/yum/* && \ chmod g+w /etc/passwd +ARG YQ_URI=https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 +ARG YQ_HASH=e70e482e7ddb9cf83b52f5e83b694a19e3aaf36acf6b82512cbe66e41d569201 +RUN echo "${YQ_HASH} -" > /tmp/sum.txt && \ + curl -L --fail "${YQ_URI}" | tee /bin/yq-go | sha256sum -c /tmp/sum.txt >/dev/null && \ + chmod +x /bin/yq-go && \ + rm /tmp/sum.txt + RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py RUN python get-pip.py 'pip<21.0' RUN python -m pip install pyopenssl diff --git a/images/installer/Dockerfile.upi.ci.rhel8 b/images/installer/Dockerfile.upi.ci.rhel8 index 0ecf5989d98..f7640bbe260 100644 --- a/images/installer/Dockerfile.upi.ci.rhel8 +++ b/images/installer/Dockerfile.upi.ci.rhel8 @@ -39,6 +39,13 @@ RUN yum update -y && \ rm -rf /var/cache/yum/* && \ chmod g+w /etc/passwd +ARG YQ_URI=https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 +ARG YQ_HASH=e70e482e7ddb9cf83b52f5e83b694a19e3aaf36acf6b82512cbe66e41d569201 +RUN echo "${YQ_HASH} -" > /tmp/sum.txt && \ + curl -L --fail "${YQ_URI}" | tee /bin/yq-go | sha256sum -c /tmp/sum.txt >/dev/null && \ + chmod +x /bin/yq-go && \ + rm /tmp/sum.txt + # Not packaged for Python 2, but required by gcloud. See https://cloud.google.com/sdk/crypto RUN pip-2 install pyopenssl ENV CLOUDSDK_PYTHON=/usr/bin/python