From 4de0706190b2f79aacb63fad3e397ce81f76e2e1 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 4 Oct 2017 15:54:08 +0200 Subject: Cleanup APT lists after installing packages /var/lib/apt/lists/ can take several MBs so get rid of them after packages are installed. Change-Id: Icfff55d92fa5c865f09db5112da28bf452a5a221 --- docker/macros.j2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index 06a911b5e..5294ddacf 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -49,10 +49,12 @@ RUN usermod --append --home {{ homedir }} --groups kolla {{ name }} \ {% macro debian_haproxy_existing_user_fix() %} {# NOTE(SamYaple): The postinst script breaks if the user 'haproxy' already exists #} -RUN apt-get -y install --no-install-recommends haproxy \ +RUN apt-get update \ + && apt-get -y install --no-install-recommends haproxy \ || sed -i '/^adduser/,+1 d' /var/lib/dpkg/info/haproxy.postinst \ && apt-get -y install -f \ - && apt-get clean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* {% endmacro %} {% macro debian_opendaylight_existing_user_fix() %} @@ -61,7 +63,8 @@ RUN apt-get update \ && apt-get -y install --no-install-recommends opendaylight \ || sed -i '/^\s*adduser/,+1 d' /var/lib/dpkg/info/opendaylight.postinst \ && apt-get -y install -f \ - && apt-get clean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* {% endmacro %} {% macro install_kubectl() %} -- cgit v1.2.3