title: Docker is extremely slow when running Laravel on Nginx container wsl2
body: <p>I've updated Windows 10 to 2004 latest version, installed wsl2 and updated it, installed docker, and ubuntu.</p>
  <p>When I create a simple <em>index.php</em> file with &quot;Hello World&quot; it's working perfectly ( response: 100-400ms ) but when I added my <em>Laravel</em> project it becomes miserable as it loads for <strong>7sec</strong> before performing the request and the response is <strong>4 - 7 seconds</strong>, even though <em>PHPMyAdmin</em> is running very smoothly (  response: 1 - 2 seconds ).</p>
  <p>my <strong>docker-compose.yml</strong> file:</p>
  <pre><code>version: '3.8'
  networks:
    laravel:
  
  services:
    nginx:
      image: nginx:stable-alpine
      container_name: nginx
      ports:
        - &quot;8080:80&quot;
      volumes:
        - ./src:/var/www/html
        - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
      depends_on:
        - php
        - mysql
        - phpmyadmin
      networks:
        - laravel
  
    mysql:
      image: mysql:latest
      container_name: mysql
      restart: unless-stopped
      tty: true
      ports:
        - &quot;3306:3306&quot;
      environment:
        MYSQL_ROOT_PASSWORD: secret
        SERVICE_TAGS: dev
        SERVICE_NAME: mysql
      networks:
        - laravel
  
    phpmyadmin:
      image: phpmyadmin/phpmyadmin
      restart: always
      depends_on:
        - mysql
      ports:
        - 8081:80
      environment:
        PMA_HOST: mysql
        PMA_ARBITRARY: 1
  
    php:
      build:
        context: .
        dockerfile: Dockerfile
      container_name: php
      volumes:
        - ./src:/var/www/html
      ports:
        - &quot;9000:9000&quot;
      networks:
        - laravel
  
    composer:
      image: composer:latest
      container_name: composer
      volumes:
        - ./src:/var/www/html
      working_dir: /var/www/html
      depends_on:
        - php
      networks:
        - laravel
  
    npm:
      image: node:latest
      container_name: npm
      volumes:
        - ./src:/var/www/html
      working_dir: /var/www/html
      entrypoint: ['npm']
  
    artisan:
      build:
        context: .
        dockerfile: Dockerfile
      container_name: artisan
      volumes:
        - ./src:/var/www/html
      depends_on:
        - mysql
      working_dir: /var/www/html
      entrypoint: ['php', '/var/www/html/artisan']
      networks:
        - laravel
  </code></pre>
  <p>I've been trying to fix this issue for 2 days but couldn't find the answer.</p>
  <p>Thanks</p>