add additional Remove yum cache

as a followup to https://review.openstack.org/#/c/505143/
"Remove yum cache"

Change-Id: Ifaaead6f6efe35808ebf79ea0d4474fbb60c8994
(cherry picked from commit b50aec6821)
This commit is contained in:
Jon Schlueter 2018-07-26 13:36:17 -04:00
parent 29484bfaa9
commit 48b09bbe36
2 changed files with 7 additions and 4 deletions

View File

@ -167,7 +167,8 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
{% endfor -%}
{%- if base_centos_yum_repo_keys|customizable('centos_yum_repo_keys')|length == 0 %}RUN {% else %} && {% endif -%}
yum -y update --security --sec-severity=Important --sec-severity=Critical \
&& yum clean all
&& yum clean all \
&& rm -rf /var/cache/yum
{% endif %}
{# Endif for base_distro centos #}
@ -188,7 +189,8 @@ RUN yum -y install \
&& yum-config-manager --enable rhel-7-server-rhceph-2-mon-rpms \
&& yum-config-manager --enable rhel-7-server-rhceph-2-tools-rpms \
&& yum -y update --security --sec-severity=Important --sec-severity=Critical \
&& yum clean all
&& yum clean all \
&& rm -rf /var/cache/yum
{% endblock %}
{% endif %}
@ -219,7 +221,8 @@ RUN yum -y install \
&& yum -y install \
yum-plugin-priorities \
&& yum -y update --security --sec-severity=Important --sec-severity=Critical \
&& yum clean all
&& yum clean all \
&& rm -rf /var/cache/yum
{% endblock %}
{% endif %}

View File

@ -42,7 +42,7 @@ RUN echo " " && \
{% if base_distro in ['debian', 'ubuntu'] %}
apt-get clean && rm -rf /var/lib/apt/lists/*'
{% else %}
yum clean all'
yum clean all && rm -rf /var/yum/cache'
{% endif %}
{% endblock %}
{% endif %}