This PR aims to reduce the image size by more than 100 MB by removing pip / pipx / pip3 cache directory.
I'm not an expert but I think the pip cache directory is useless in our case since we aren't going to need them after on, so we don't care about them being cached.
The cache is located in the folder /root/.cache/pip/ and while they are not present in the final image (they are probably cleaned up at some point but they still take some space because they are present in the layers of the image).
I would also say that there is 3 ways of getting rid of this cache:
By adding the argument --pip-args="--no-cache-dir" or --no-cache-dir (if pip is directly used)
By setting a environment variable PIP_NO_CACHE_DIR=1
By removing the folder /root/.cache/pip/ after each steps (web, misc, osint, ...), in the bash script
I've only done this for the ad script for now, I will continue for other steps if you like this PR.
Description
Greetings,
This PR aims to reduce the image size by more than 100 MB by removing
pip
/pipx
/pip3
cache directory.I'm not an expert but I think the
pip
cache directory is useless in our case since we aren't going to need them after on, so we don't care about them being cached.I saw this trick from here: https://stackoverflow.com/questions/45594707/what-is-pips-no-cache-dir-good-for
Related issues
N / A
Point of attention
I tested a few package and it seems to work fine.
The cache is located in the folder
/root/.cache/pip/
and while they are not present in the final image (they are probably cleaned up at some point but they still take some space because they are present in the layers of the image).I would also say that there is 3 ways of getting rid of this cache:
--pip-args="--no-cache-dir"
or--no-cache-dir
(ifpip
is directly used)PIP_NO_CACHE_DIR=1
/root/.cache/pip/
after each steps (web, misc, osint, ...), in the bash scriptI've only done this for the
ad
script for now, I will continue for other steps if you like this PR.Regards.