Skip to content

Commit

Permalink
docker prefer copy to add (#1250)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maipbui authored Jun 9, 2023
1 parent d6eee42 commit 00a953c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .azure-pipelines/docker-sonic-vs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker-sonic-vs
ARG docker_container_name
ARG need_dbg

ADD ["debs", "/debs"]
COPY ["debs", "/debs"]

RUN dpkg -i /debs/libswsscommon_1.0.0_amd64.deb \
/debs/python3-swsscommon_1.0.0_amd64.deb \
Expand Down

0 comments on commit 00a953c

Please sign in to comment.