Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker prefer COPY to ADD in dockerfile #2817

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

maipbui
Copy link
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

@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 <[email protected]>
#### 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