advancedTop 100 Interview Questions

What's the difference between COPY and ADD?

COPY simply copies files/directories from the build context into the image. ADD does the same but additionally auto-extracts local tar archives and can fetch remote URLs. Best practice is to default to COPY and use ADD only when you specifically need its extraction or URL-fetch behavior.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.

What's the difference between COPY and ADD?

Next Step

Continue to What does HEALTHCHECK actually do?← Back to all Docker questions