Do not use cache when installing packages

Metadata

ID: docker-best-practices/pip-no-cache

Language: Docker

Severity: Notice

Category: Best Practices

Description

When installing Python packages with pip, always pin the version.

Non-Compliant Code Examples

FROM busybox
RUN pip install django
RUN pip3 install django

Compliant Code Examples

FROM busybox
RUN pip install --no-cache-dir django