What is pip's `--no-cache-dir` good for?

后端 未结 5 716
清酒与你
清酒与你 2021-01-30 07:55

I\'ve recently seen the --no-cache-dir being used in a Docker file. I\'ve never seen that flag before and the help is not explaining it:

 --no-cache         


        
5条回答
  •  情深已故
    2021-01-30 08:25

    I think there is a good reason to use --no-cache-dir when you are building Docker images. The cache is usually useless in a Docker image, and you can definitely shrink the image size by disabling the cache.

提交回复
热议问题