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

0

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.

Devops docker
asked Apr 30, 2023 at 23:01
Sign in to add a comment

0 Answers

0
πŸ“ No answers yet!

Be the first to answer this interview question.

Your Answer

Sign in to post your answer and help the community.