When using Docker to build Nginx and PHP-FPM environments, there is an important point to remember. That is to mount the necessary files on both the Nginx and PHP-FPM containers.
This is because Nginx serves static files directly and proxies requests for PHP files to PHP-FPM. Therefore, the file must exist in a location that is accessible to both containers.