Docker ADD vs COPY
Docker best practice:
Prefer COPY over ADD when copying files from a location to a Docker image.
Use ADD to:
- download external files
- extract an archive to the destination
👇
# copy local files on the host to the destination COPY /source/path /destination/path ADD /source/path /destination/path # download external file and copy to the destination ADD http://external.file/url /destination/path # copy and extract local compresses files ADD source.file.tar.gz /destination/path