wyveo / nginx-php-fpm

Nginx + PHP-FPM 8.2.x / 8.1.x / 8.0.x / 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x + Composer built on Debian (Bullseye/Buster) image
https://hub.docker.com/r/wyveo/nginx-php-fpm
MIT License
343 stars 248 forks source link

Dockerfile ADD statement #23

Closed manuasir closed 3 years ago

manuasir commented 3 years ago

https://github.com/wyveo/nginx-php-fpm/blob/d10d5bf81bb612f7e7fee6ced5e1dcce22408e3b/Dockerfile#L106-L109

Since this is not currently used for tar extraction nor URLs, shouldn't we use COPY instead of ADD? According to the best practices in the Docker official documentation:

Although ADD and COPY are functionally similar, generally speaking, COPY is preferred. That’s because it’s more transparent than ADD. COPY only supports the basic copying of local files into the container, while ADD has some features (like local-only tar extraction and remote URL support) that are not immediately obvious. Consequently, the best use for ADD is local tar file auto-extraction into the image, as in ADD rootfs.tar.xz /.

Share your thoughts on this, I can open PRs if it sounds good to you.

Cheers

colinwilson commented 3 years ago

Since this is not currently used for tar extraction nor URLs, shouldn't we use COPY instead of ADD?

Agreed. PRs welcomed. Thank you.

colinwilson commented 3 years ago

@manuasir Merged 🎉. Thank you again for contributing.