From 110a3fd3acb5ec5a9da7b7fce6ffd0d27ed782ac Mon Sep 17 00:00:00 2001 From: Mai Bui Date: Thu, 22 Jun 2023 16:16:56 -0400 Subject: [PATCH] docker prefer COPY to ADD in dockerfile (#15394) #### 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. --- platform/p4/docker-sonic-p4/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/p4/docker-sonic-p4/Dockerfile.j2 b/platform/p4/docker-sonic-p4/Dockerfile.j2 index 80503b910e..11e34ff1f8 100644 --- a/platform/p4/docker-sonic-p4/Dockerfile.j2 +++ b/platform/p4/docker-sonic-p4/Dockerfile.j2 @@ -81,7 +81,7 @@ RUN sed -ri 's/^(save .*$)/# \1/g; s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf -ADD port_config.ini /port_config.ini +COPY ["port_config.ini", "/port_config.ini"] COPY ["start.sh", "orchagent.sh", "config_bm.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/configdb-load.sh", "/usr/bin/"]