PHP Docker Vendor Autoload.php not found

I am trying to setup the Dockerfile for PHP services. PHP scripts are served using Nginx server in docker container but its giving me vendor/autoload.php not found error.

I have tried changing Dockerfile several times but the vendor/autoload.php error still persists.

Here is the Dockerfile

FROM composer as builder

RUN mkdir -p /usr/app/php-services
WORKDIR /usr/app/php-services
#copy composer file
COPY composer.json .

RUN composer install

#copy php-scripts to /usr/app/php-services
COPY . .

FROM nginx:alpine

COPY --from=builder /usr/app/php-services /usr/app/php-services
COPY ./phpdocker/nginx/nginx.conf /etc/nginx/conf.d/default.conf

#check if vendor has autoload file and it exists!!!
RUN ls /usr/app/php-services/vendor


The scripts should work fine but whenever I run docker logs it says.
enter image description here

Here is the nginx.conf file

server {
listen 8000;

access_log /var/log/nginx/application.access.log;

root /usr/app/php-services;

location / {
    try_files $uri /index.php$is_args$args;

location ~ .php$ {
    fastcgi_pass php-fpm:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
    include fastcgi_params;

I have tried almost everything and have literally no idea why this is happening. What am I doing wrong here? Is there any issue in my nginx.conf file?

Source: StackOverflow