From d47ddd41ea2a489f36d15d3da956709bcf62dcca Mon Sep 17 00:00:00 2001 From: Colin Hutchinson Date: Thu, 3 Feb 2022 08:51:08 -0500 Subject: [PATCH] fix(centos): centos needs a yum clean (#541) * fix(centos): we need to yum clean for the sed to work * fix(centos): eat any error so we're centos7 and amazonlinux compatible --- centos/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/centos/Dockerfile b/centos/Dockerfile index 684e6e02..89fad93e 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -15,8 +15,9 @@ ARG KONG_SHA256="d3769c15297d1b1b20cf684792a664ac851977b2c466f2776f2ae705708539e # hadolint ignore=DL3033 RUN set -ex; \ - sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*; \ - sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*; \ + sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* || true; \ + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* || true; \ + yum clean all; \ if [ "$ASSET" = "ce" ] ; then \ curl -fL https://download.konghq.com/gateway-${KONG_VERSION%%.*}.x-centos-8/Packages/k/kong-$KONG_VERSION.el8.amd64.rpm -o /tmp/kong.rpm \ && echo "$KONG_SHA256 /tmp/kong.rpm" | sha256sum -c -; \