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 #15394

Merged
merged 1 commit into from
Jun 22, 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 to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@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 lguohan as a code owner June 8, 2023 19:02
@qiluo-msft qiluo-msft merged commit 110a3fd into sonic-net:master Jun 22, 2023
@maipbui maipbui deleted the docker-prefer-copy-to-add branch June 22, 2023 20:19
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 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.
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