Clean up apt cache

By removing /var/lib/apt/lists it reduces the image size.

Change-Id: Icbe118a2725700b9e5e8da97d062161c5b9a5d2d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-04-28 16:03:36 -04:00
parent d618d9a032
commit 736695553e

View File

@ -16,7 +16,9 @@
FROM python:slim as fake-python
WORKDIR /tmp
RUN apt-get update && apt-get install -y equivs
RUN apt-get update \
&& apt-get install -y equivs \
&& rm -rf /var/lib/apt/lists/*
COPY python3-dev.control /tmp/python3-dev.control
RUN equivs-build /tmp/python3-dev.control
@ -28,4 +30,5 @@ COPY scripts/get-extras-packages /usr/local/bin/get-extras-packages
COPY scripts/install-from-bindep /output/install-from-bindep
RUN dpkg -i /tmp/python3-dev_4.0.0_all.deb \
&& rm /tmp/python3-dev_4.0.0_all.deb \
&& pip install bindep
&& pip install bindep \
&& rm -rf /var/lib/apt/lists/*