From d0b38a2fcd453ae3fa6a4d2167920ab5e742b404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 3 Jun 2020 12:10:52 -0300 Subject: [PATCH] fix(dockerfiles): conditionals construction --- Dockerfile.yum | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.yum b/Dockerfile.yum index 4e89fbe..6da3b9e 100644 --- a/Dockerfile.yum +++ b/Dockerfile.yum @@ -14,16 +14,16 @@ ARG PKGS="udev git net-tools sudo curl openssh-server openssh-clients which $EXT SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Centos 7 requires EPEL repo before being able to install python2-pip -RUN if [ "${DISTRO_NAME}" = "centos" ] && [ "${DISTRO_VERSION}" = "7" ]; \ +RUN if [[ "${DISTRO_NAME}" = "centos" && "${DISTRO_VERSION}" = "7" ]]; \ then yum -y install epel-release; \ fi \ # Centos 6 installs python27-pip from the salt repo - && if [ "${DISTRO_NAME}" = "centos" ] && [ "${DISTRO_VERSION}" = "6" ]; \ + && if [[ "${DISTRO_NAME}" = "centos" && "${DISTRO_VERSION}" = "6" ]]; \ then yum -y update && yum -y install $EXTRA_PACKAGES; \ ln -s /usr/bin/pip2.7 /usr/bin/pip; \ fi \ # Amazon 1 installs python26-pip - && if [ "${DISTRO_NAME}" = "amazonlinux" ] && [ "${DISTRO_VERSION}" = "1" ]; \ + && if [[ "${DISTRO_NAME}" = "amazonlinux" && "${DISTRO_VERSION}" = "1" ]]; \ then yum -y update && yum -y install $EXTRA_PACKAGES; \ ln -s /usr/bin/pip-2.6 /usr/bin/pip; \ fi \