As per this the following reference https://docs.docker.com/engine/reference/builder/#copy I see no difference between ADD and COPY. Please help me with a simple example explaining the difference.
From Docker online documentation :
ADD or COPY
Although ADD and COPY are functionally similar, generally speaking, COPY is preferred. That’s because it’s more transparent than ADD. COPY only supports the basic copying of local files into the container, while ADD has some features (like local-only tar extraction and remote URL support) that are not immediately obvious. Consequently, the best use for ADD is local tar file auto-extraction into the image, as in ADD rootfs.tar.xz /.
More information can be found at Best Practices for writing Dockerfiles
Basically,
Use COPY for plain files and/or directories copy,
Use ADD for extracting TAR archives or downloading remote content,
Found the answer here: Docker COPY vs ADD
<src>
to be an URL <src>
parameter of ADD is anIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With