Does the Dockerfile change the files in the project folder?

Hello,
The Dockerfile is as follows:

FROM php:8.3-fpm


RUN apt-get update && apt-get install -y \
    build-essential \
    libpng-dev \
    libjpeg62-turbo-dev \
    libfreetype6-dev \
    libonig-dev \
    libzip-dev \
    zip \
    unzip \
    git \
    curl \
    net-tools \
    ncat \
    && apt-get clean && rm -rf /var/lib/apt/lists/*


RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd


RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer


RUN groupadd -g 1000 www && \
    useradd -u 1000 -ms /bin/bash -g www www


WORKDIR /var/www


COPY --chown=www:www . .


ENV APP_ENV=local
ENV APP_DEBUG=true


RUN composer install --no-dev --no-interaction --optimize-autoloader --no-scripts


USER www


RUN php artisan package:discover || true

EXPOSE 9000
CMD ["php-fpm"]

The Dockerfile compiles all the files and then copies them to the /var/www directory.

The docker-compose.yml is as follows:

services:
  # PHP-FPM Service
  backend:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: backend
    restart: unless-stopped
    environment:
      APP_ENV: local
      APP_DEBUG: "true"
      DB_HOST: db
      DB_PORT: 3306
      DB_DATABASE: laravel_db
      DB_USERNAME: laravel_user
      DB_PASSWORD: secret
#    volumes:
#      - ./:/var/www
    ports:
      - 9000:9000
    networks:
      - app_network

  # Web Server
  webserver:
    image: nginx:latest
    container_name: webserver
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./:/var/www
      - ./nginx/conf.d:/etc/nginx/conf.d
    networks:
      - app_network
    depends_on:
      - backend

  # Database
  db:
    image: mariadb:latest
    container_name: db
    restart: unless-stopped
    environment:
      MARIADB_ROOT_PASSWORD: rootsecret
      MARIADB_DATABASE: laravel_db
      MARIADB_USER: laravel_user
      MARIADB_PASSWORD: secret
    volumes:
      - mariadb_data:/var/lib/mysql
      - ./mysql/my.cnf:/etc/mysql/my.cnf
    ports:
      - "3306:3306"
    networks:
      - app_network


networks:
  app_network:
    driver: bridge

volumes:
  mariadb_data:
    driver: local

Now Nginx is copying and executing the unchanged file that is in the current directory. Am I right?

Thank you.