summaryrefslogtreecommitdiff
path: root/docker/macros.j2
diff options
context:
space:
mode:
authorChristian Berendt <berendt@betacloud-solutions.de>2016-08-05 15:28:09 +0200
committerChristian Berendt <berendt@betacloud-solutions.de>2016-08-07 19:03:52 +0000
commit4e8bf3f90da2b1b36575528a30926a575bfc4095 (patch)
treec5c1950cd8fe5352be3966b067062cb21c6bd93b /docker/macros.j2
parent3071d32a3fb76e72901112a9b3e7fc59233f54bf (diff)
downloadkolla-4e8bf3f90da2b1b36575528a30926a575bfc4095.tar.gz
kolla-4e8bf3f90da2b1b36575528a30926a575bfc4095.zip
Remove files from /var/lib/apt/lists when cleaning up on Ubuntu/Debian
The files inside /var/lib/apt/lists are not needed and should be removed when cleaning up after a package installation. TrivialFix Change-Id: I80e2a11e05739f3dd5bcc3bb8564d8a73ec1ab17
Diffstat (limited to 'docker/macros.j2')
-rw-r--r--docker/macros.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2
index c10973ef6..0774a187d 100644
--- a/docker/macros.j2
+++ b/docker/macros.j2
@@ -2,6 +2,6 @@
{% 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
+ apt-get -y install --no-install-recommends {{ packages | join(' ') }} && apt-get clean && rm -rf /var/lib/apt/lists/*
{%- endif %}
{%- endmacro %}