What is the difference between Docker COPY and ADD instructions?
Both copy files into the image, but ADD has extra functionality that makes it unpredictable:
ADDcan fetch files from a URLADDauto-extracts tar archives into the destination
Best practice: Always use COPY unless you specifically need the URL or auto-extraction features. COPY is explicit and predictable, which is better for reproducible builds.