Skip to content

Commit

Permalink
fix(dockerfiles): conditionals construction
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Jun 3, 2020
1 parent 620d8bc commit d0b38a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.yum
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit d0b38a2

Please sign in to comment.