Reduce size of CoreOS ramdisk

By disabling pip cache, we're able to reduce the size of generated
docker image by 10%. The resulting ramdisk size goes from 229MB to
218MB.

It is possible to decrease the size even further by combining all the
RUN instructions into one but it doesn't provide a substantial gain and
it harms readability.

Change-Id: Ie23636fe709ab7c1bcf4d6c51299c173a5b642ac
This commit is contained in:
Martin André 2015-10-08 14:51:06 +09:00
parent 2c0ebdea09
commit 5f7bc48707
1 changed files with 2 additions and 2 deletions

View File

@ -29,10 +29,10 @@ RUN apt-mark manual python-minimal
# Install requirements separately, because pip understands a git+https url
# while setuptools doesn't
RUN pip install --upgrade pip
RUN pip install -r /tmp/ironic-python-agent/requirements.txt
RUN pip install --no-cache-dir -r /tmp/ironic-python-agent/requirements.txt
# This will succeed because all the dependencies were installed previously
RUN pip install /tmp/ironic-python-agent
RUN pip install --no-cache-dir /tmp/ironic-python-agent
# Remove no longer needed packages
RUN apt-get -y purge gcc-4.6 gcc python2.7-dev git && \