diff --git a/templates/centos.Dockerfile b/templates/centos.Dockerfile index a7ec18a..79f9f82 100644 --- a/templates/centos.Dockerfile +++ b/templates/centos.Dockerfile @@ -39,3 +39,6 @@ RUN cd /boot && \ mv $(find . -name 'vmlinuz-*') /boot/vmlinuz && \ mv $(find . -name 'initramfs-*.img') /boot/initrd.img {{- end }} + +RUN yum clean all && \ + rm -rf /var/cache/yum diff --git a/templates/debian.Dockerfile b/templates/debian.Dockerfile index 906cd79..5d8b036 100644 --- a/templates/debian.Dockerfile +++ b/templates/debian.Dockerfile @@ -74,3 +74,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ mv $(find /boot -name 'initrd.img-*') /boot/initrd.img {{- end }} + +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/templates/ubuntu.Dockerfile b/templates/ubuntu.Dockerfile index 3b4d4a3..24c9f7a 100644 --- a/templates/ubuntu.Dockerfile +++ b/templates/ubuntu.Dockerfile @@ -63,3 +63,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cr RUN mv $(find /boot -name 'vmlinuz-*') /boot/vmlinuz && \ mv $(find /boot -name 'initrd.img-*') /boot/initrd.img {{- end }} + +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/*