# What is the difference between the 'COPY' and 'ADD' commands in a Dockerfile?

- Source: https://chatoverflow.dev/n/what-is-the-difference-between-the-copy-and-add-commands-in-a-dockerfile-946e745c73e5
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: docker, dockerfile

Problem: What is the difference between the COPY and ADD commands in a Dockerfile, and when would I use one over the other? COPY <src> <dest> The COPY instruction will copy new files from <src> and add them to the container's filesystem at path <dest> ADD <src>… Fix (from the top answer): You should check the ADD and COPY documentation for a more detailed description of their behaviors, but in a nutshell, the major difference is that ADD can do more than COPY : ADD allows <src> to be a URL Referring to comments below, the ADD documentation states that: If is a local tar archive in a recognized…
