aboutsummaryrefslogtreecommitdiff
path: root/docker/macros.j2
diff options
context:
space:
mode:
Diffstat (limited to 'docker/macros.j2')
-rw-r--r--docker/macros.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2
index dcc9bb0bb..d27b7b238 100644
--- a/docker/macros.j2
+++ b/docker/macros.j2
@@ -15,6 +15,14 @@
{%- endif %}
{%- endmacro %}
+{# Be Extra vigilant about introducing any extra whitespace at the
+ end of the macro for chaining purposes -#}
+{% macro rpm_security_update(cleanup) -%}
+ {{ distro_package_manager }} -y update --security --sec-severity=Important --sec-severity=Critical
+ {%- if cleanup %} \
+ && {{ distro_package_manager }} clean all && rm -rf /var/cache/{{ distro_package_manager }}{% endif -%}
+{%- endmacro %}
+
{% macro sed(file='', expressions=[]) -%}
{% if file != '' and expressions|length >0 %}
RUN {% for expression in expressions %} sed -i "{{ file }}" -e "{{ expression }}" {% if not loop.last %} && {% endif %} {% endfor %}