summaryrefslogtreecommitdiffstats
path: root/sonar.sh
diff options
context:
space:
mode:
authorPratik Raj <rajpratik71@gmail.com>2020-06-06 21:56:53 +0530
committerkrishna moorthy <krishna.moorthy6@wipro.com>2020-08-01 15:40:06 +0000
commit9b01155e3ca2626e6ca7416fbf857bcd92a8ad39 (patch)
tree81f64455c207612a60af9b179f7b701db0c9ee21 /sonar.sh
parent8699f0d40189cc35775399352aa1f35e175bdd29 (diff)
optimize size and time using "--no-cache-dir"
Using "--no-cache-dir" flag in pip install ,make sure dowloaded packages by pip don't cached on system . This is a best practise which make sure to fetch ftom repo instead of using local cached one . Further , in case of Docker Containers , by restricing caching , we can reduce image size. In term of stats , it depends upon the number of python packages multiplied by their respective size . e.g for heavy packages with a lot of dependencies it reduce a lot by don't caching pip packages. Further , more detail information can be found at https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6 Issue-ID: OPTFRA-774 Signed-off-by: Pratik Raj <rajpratik71@gmail.com> Change-Id: I40d9eb94ecea623a9ed54b50b1786b154788a17b
Diffstat (limited to 'sonar.sh')
-rwxr-xr-xsonar.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar.sh b/sonar.sh
index 566ede7..4d17c7c 100755
--- a/sonar.sh
+++ b/sonar.sh
@@ -29,8 +29,8 @@ run_tox_test()
rm -rf ./venv-tox ./.tox
virtualenv ./venv-tox
source ./venv-tox/bin/activate
- pip install --upgrade pip
- pip install --upgrade tox argparse
+ pip install --no-cache-dir --upgrade pip
+ pip install --no-cache-dir --upgrade tox argparse
pip freeze
tox -e cover
deactivate