# COPY vs. ADD

> What is the difference between COPY and ADD in a Dockerfile, and when should you use ADD instead of COPY?

Canonical: https://www.internhack.in/learn/interview/docker-containers/docker-copy-vs-add
Last updated: 2026-11-28

Difficulty: Beginner

## Question

What is the difference between COPY and ADD in a Dockerfile, and when should you use ADD instead of COPY?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

COPY, ADD, Build Context, Tar Auto-extraction, Remote URLs

Previous: [Volumes vs. Bind Mounts](https://www.internhack.in/learn/interview/docker-containers/docker-volumes-vs-bind-mounts) · Next: [Docker Compose](https://www.internhack.in/learn/interview/docker-containers/docker-compose-purpose) · [All of Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)

## More Docker & Containers questions

- [Networking Drivers](https://www.internhack.in/learn/interview/docker-containers/docker-networking-drivers)
- [Graceful Shutdown (Stop vs Kill)](https://www.internhack.in/learn/interview/docker-containers/docker-container-killing-graceful)
- [Dockerizing Node.js Apps](https://www.internhack.in/learn/interview/docker-containers/dockerize-node-app-best-practices)
- [Container Security](https://www.internhack.in/learn/interview/docker-containers/docker-security-best-practices)
- [Troubleshooting & Logs](https://www.internhack.in/learn/interview/docker-containers/docker-logs-troubleshooting)
- [Layering & Copy-on-Write](https://www.internhack.in/learn/interview/docker-containers/docker-storage-layers-copy-on-write)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)
