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.
This commit is contained in:
Mai Bui 2023-06-22 16:16:56 -04:00 committed by GitHub
parent fca3458ae7
commit 110a3fd3ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/ \ 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 ' /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 ["start.sh", "orchagent.sh", "config_bm.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/configdb-load.sh", "/usr/bin/"] COPY ["files/configdb-load.sh", "/usr/bin/"]