From 78c819d6232b3fa5c6fb6aa5ea85a54c596f0b56 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Mon, 25 Feb 2019 16:04:39 -0700 Subject: Add distro_package_manager configuration Add configuration to allow the switch between dnf/yum or provide an alternative package manager. Change-Id: I913769fcf5875a12b4561958cf7c90b74cd116ea --- docker/macros.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index ee1ff93c4..3e1353e71 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -1,7 +1,7 @@ {% macro install_packages(packages) -%} {% if packages is defined and packages|length > 0 -%} {% if base_package_type == 'rpm' -%} - RUN yum -y install {{ packages | join(' ') }} && yum clean all && rm -rf /var/cache/yum + RUN {{ distro_package_manager }} -y install {{ packages | join(' ') }} && {{ distro_package_manager }} clean all && rm -rf /var/cache/{{ distro_package_manager }} {%- elif base_package_type == 'deb' -%} {#- debian_package_install is a utility method to build up an appropriate -- cgit v1.2.3