What is the difference between Add and Copy command in a Docker file?

Asked: Apr 30, 2023

Both Add and Copy commands of Docker files can copy new files from a source location to a destination in Container’s file path. They behave almost the same.
The main difference between these two is that Add command can also read the files from a URL.
As per Docker documentation, the Copy command is preferable. Since Copy only supports copying local files to a Container, it is preferred over Add command.

Asked by brijesh
docker

Answers (0)

No answers yet. Be the first to answer!