Skip to content

docker prefer COPY to ADD in dockerfile#2817

Merged
maipbui merged 1 commit intosonic-net:masterfrom
maipbui:docker-prefer-copy-to-add
Jun 9, 2023
Merged

docker prefer COPY to ADD in dockerfile#2817
maipbui merged 1 commit intosonic-net:masterfrom
maipbui:docker-prefer-copy-to-add

Conversation

@maipbui
Copy link
Copy Markdown
Contributor

@maipbui maipbui commented Jun 8, 2023

Why I did it
Docker best practices prefer COPY to ADD
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
Work item tracking
Microsoft ADO (number only): 17418730
How I did it
Use the COPY command as opposed to ADD unless working with a tar file.
How I verified it

Details if related

Signed-off-by: Mai Bui <maibui@microsoft.com>
@maipbui maipbui requested a review from qiluo-msft June 8, 2023 18:42
@maipbui maipbui marked this pull request as ready for review June 8, 2023 19:02
@maipbui maipbui requested a review from prsunny as a code owner June 8, 2023 19:02
@maipbui maipbui merged commit 7702466 into sonic-net:master Jun 9, 2023
@maipbui maipbui deleted the docker-prefer-copy-to-add branch June 9, 2023 13:34
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Jul 20, 2023
Signed-off-by: Mai Bui <maibui@microsoft.com>
#### Why I did it
Docker best practices prefer COPY to ADD
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
##### Work item tracking
- Microsoft ADO **(number only)**: 17418730
#### How I did it
Use the COPY command as opposed to ADD unless working with a tar file.
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Signed-off-by: Mai Bui <maibui@microsoft.com>
#### Why I did it
Docker best practices prefer COPY to ADD
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
##### Work item tracking
- Microsoft ADO **(number only)**: 17418730
#### How I did it
Use the COPY command as opposed to ADD unless working with a tar file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants