Docker

Docker

Made by DeepSource

Avoid cache directory with pip install --no-cache-dir <package> DOK-P1003

Performance
Minor

Once a package is installed, it does not need to be re-installed and the Docker cache can be leveraged instead. Since the pip cache makes the images larger and is not needed, it's better to disable it.

Bad Practice

RUN pip3 install foobar

Recommended

RUN pip3 install --no-cache-dir foobar