Docker images should only contain the necessary data. The package index is redundant for the correct operation of the installed software. Storing
an index also increases the size of the Docker image. It should be reduced to speed up deployments and reduce storage and bandwidth.
Exceptions
In multi-stage builds, the rule only scans instructions that are part of the final image.