1. Checked the Nginx error log: PHP message: PHP Fatal error: require(): Failed opening required ‘/mcloud/www/cmcp-api/vendor/composer/../myclabs/deep-copy/src/DeepCopy/deep_copy.php’. As shown in Figure 1.

2. Checked the files on Gitlab and found that the directory: /vendor/composer/../myclabs/deep-copy is an empty directory. As shown in Figure 2.

3. Deleted the \vendor\myclabs\deep-copy\.git directory. As shown in Figure 3.

4. Selected the corresponding files and added them. As shown in Figure 4.

5. Committed. As shown in Figure 5.

6. All – Commit – Push. As shown in Figure 6.

7. Checked the files on Gitlab and found that the corresponding files already exist under the directory: /vendor/composer/../myclabs/deep-copy. As shown in Figure 7.

8. An error occurred while building the image: Step 4/7 : COPY code /mcloud/www/cmcp-api. Error processing tar file(exit status 1): open /vendor/myclabs/deep-copy/fixtures/f005/Foo.php: no such file or directory. As shown in Figure 8.

9. Checked the files on Gitlab and found that the file: /vendor/myclabs/deep-copy/fixtures/f005/Foo.php exists. As shown in Figure 9.

10. Built again, and the build succeeded. As shown in Figure 10.

11. Similar issues still occurred afterwards. As follows:
12. Searched for .git in the /vendor directory and found dozens of .git directories. Finally decided to delete /vendor, run composer install to reinstall, and then delete the .git directory in each directory. Committed and pushed again. As shown in Figure 11.

PHP message: PHP Fatal error: require(): Failed opening required '/mcloud/www/cmcp-api/vendor/composer/../paragonie/random_compat/lib/random.php'
PHP message: PHP Fatal error: require(): Failed opening required '/mcloud/www/cmcp-api/vendor/composer/../guzzlehttp/promises/src/functions_include.php'
13. Checked the Nginx error log, and no more errors were reported. This is as expected.
14. Referenced Should I commit the dependencies in my vendor directory?: https://docs.phpcomposer.com/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.html . I adopted the third option. Actually, I feel that adopting the fourth option would involve relatively less work. As shown in Figure 12.

