Docker

Docker

Made by DeepSource

Use COPY instead of ADD for files and folders DOK-DL3020

Performance
Major

For items like files and directories that do not require ADD’s tar auto-extraction capability, you should always use COPY. Read more about it here.

Bad Practice

FROM python:3.4
ADD requirements.txt /usr/src/app/

Recommended

FROM python:3.4
COPY requirements.txt /usr/src/app/

Exceptions

The best use for ADD is local tar file auto-extraction into the image.