Dockerfile: avoid deploy the python pip cache

This patch prevents deployment of the pip cache folder that is only
needed during installation. Which is also done with the apt,
where at the end of the install operation we delete the
cache and all temporary folders.

The reducion of the image size is insignificant:
| builder@1373d0b95f44:/build$ sudo du -sh /root/.cache/pip
| 1.6M    /root/.cache/pip

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jose Quaresma 2022-10-14 10:07:38 +02:00 committed by Jan Kiszka
parent 044de41a9a
commit c0d00aa637

View File

@ -20,7 +20,8 @@ COPY . /kas
RUN chmod -R o-w /kas
RUN pip3 --proxy=$https_proxy install --no-deps kconfiglib && \
pip3 --proxy=$https_proxy install --no-deps /kas && kas --version
pip3 --proxy=$https_proxy install --no-deps /kas && kas --version && \
rm -rf $(pip3 cache dir)
RUN ln -s /kas/contrib/oe-git-proxy /usr/bin/
ENV GIT_PROXY_COMMAND="oe-git-proxy" \