multiarch / centos

:earth_africa: `centos` Docker image for multiple architectures
MIT License
9 stars 5 forks source link

A case to use COPY rather than ADD #12

Open junaruga opened 5 years ago

junaruga commented 5 years ago

This related to https://github.com/multiarch/qemu-user-static/pull/66 .

seeing

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy Although ADD and COPY are functionally similar, generally speaking, COPY is preferred. ... For other items (files, directories) that do not require ADD’s tar auto-extraction capability, you should always use COPY.

Maybe this code is the case to change from ADD to COPY. https://github.com/multiarch/centos/blob/master/update.sh#L103

ADD qemu-${qemu_arch}-static /usr/bin