From 506a04a3895613ab80752b869dbbd3b62812ba8f Mon Sep 17 00:00:00 2001 From: Nick Vyzas Date: Fri, 14 Feb 2020 20:23:16 +0200 Subject: [PATCH] Adding more logic for CentOS builds --- .../rhel-compliant/rhel7/entrypoint/entrypoint.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash b/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash index 85b8a339c..f24bdb0dd 100755 --- a/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash @@ -8,8 +8,16 @@ echo "==> Build environment:" env echo "==> Dirty patching to ensure OS deps are installed" -yum -y install python2 gnutls-devel libtool || true -ln -s /usr/bin/python2.7 /usr/bin/python + +if [[ $(rpm -E %{rhel} | cut -d"." -f1) -eq "7" ]]; +then + echo "==> Installing dependancies for RHEL compliant version 7" + yum -y install gnutls-devel libtool || true +else + echo "==> Installing dependancies for RHEL compliant version 8" + yum -y install python2 gnutls-devel libtool || true + ln -s /usr/bin/python2.7 /usr/bin/python +fi echo "==> Cleaning" # Delete package if exists