The ADD instruction is used to copy files and folders into the Docker image being built. The syntax for the ADD instruction is as follows:
# ADD instruction syntax
ADD [--chown=<user>:<group>] <src>... <dest>
# Use double quotes for paths containing whitespace)
ADD [--chown=<user>:<group>] ["<src>",... "<dest>"]
About now, you are thinking that the ADD instruction seems to be just like the COPY instruction that we just reviewed. Well, you are not wrong. Basically, all of the things we saw the COPY instruction do, the ADD instruction can do as well. It uses the same syntax as the COPY instruction and the effects of WORKDIR instructions are the same between the two. So, why do we have two commands that do the same thing?