Interview Prep/Docker/Dockerfile Instructions & Builds

`COPY` vs `ADD`?

BeginnerConceptDockerfile Instructions & Builds
Answer

COPY copies files from the build context (or another stage). ADD does the same plus auto-extracts local tar archives and can fetch remote URLs (and Git repos). Use COPY by default for clarity; use ADD for local tar extraction, or ADD --checksum=sha256:... URL when you need a verified download.

All Docker questions Roadmap: Docker & containers

More on Dockerfile Instructions & Builds