From e46ace7013f61a5cd0265b813d4f596e5140b666 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Sat, 6 Jun 2020 21:49:55 +0530 Subject: 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: CLAMP-861 Signed-off-by: Pratik Raj Change-Id: I7e7a7799ae48901c289d07bc07e7c96f24f5d078 --- extra/docker/clamp/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extra/docker') diff --git a/extra/docker/clamp/docker-compose.yml b/extra/docker/clamp/docker-compose.yml index 8d57be038..81cac25cb 100644 --- a/extra/docker/clamp/docker-compose.yml +++ b/extra/docker/clamp/docker-compose.yml @@ -35,4 +35,4 @@ services: - "../../../src/test/resources/http-cache/:/script/:ro" ports: - "8085:8085" - command: /bin/sh -c "pip install requests && pip install simplejson && python -u /script/third_party_proxy.py -v true --port 8085 --root /thirdparty --proxyaddress third-party-proxy:8085" + command: /bin/sh -c "pip install --no-cache-dir requests && pip install --no-cache-dir simplejson && python -u /script/third_party_proxy.py -v true --port 8085 --root /thirdparty --proxyaddress third-party-proxy:8085" -- cgit 1.2.3-korg