-
Notifications
You must be signed in to change notification settings - Fork 417
DL3020
Hamed Heidarian edited this page Jan 14, 2024
·
4 revisions
FROM python:3.4
ADD requirements.txt /usr/src/app/
FROM python:3.4
COPY requirements.txt /usr/src/app/
https://docs.docker.com/develop/develop-images/instructions/#add-or-copy
For other items (files, directories) that do not require ADD’s tar auto-extraction capability, you should always use COPY.
Rule also implemented in https://github.com/RedCoolBeans/dockerlint/blob/master/src/checks.coffee
Consequently, the best use for ADD is local tar file auto-extraction into the image.