aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/macros.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2
new file mode 100644
index 000000000..c10973ef6
--- /dev/null
+++ b/docker/macros.j2
@@ -0,0 +1,7 @@
+{% macro install_packages(packages) -%}
+{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%}
+ yum -y install {{ packages | join(' ') }} && yum clean all
+{%- elif base_distro in ['ubuntu', 'debian'] -%}
+ apt-get -y install --no-install-recommends {{ packages | join(' ') }} && apt-get clean
+{%- endif %}
+{%- endmacro %}