Docker Certified Associate (DCA) — Question 3
What is the difference between the ADD and COPY Dockerfile instructions? (Choose two.)
Answer options
- A. ADD supports regular expression handling while COPY does not.
- B. COPY supports compression format handling while ADD does not.
- C. ADD supports compression format handling while COPY does not.
- D. COPY supports regular expression handling while ADD does not.
- E. ADD supports remote URL handling while COPY does not.
Correct answer: C, E
Explanation
The correct answer is C and E because ADD has the capability to handle compression formats and can also fetch files from remote URLs, which COPY cannot do. Options A and D incorrectly attribute regular expression handling to ADD and COPY, while B incorrectly states that COPY supports compression handling, which it does not.