Docker project locally runs very slow

Hello docker community I have this problem where my project is taking 40 to 60 seconds to open up with docker

Even when I refresh it , runs very slow. If I open my project with xampp runs smoothly.

Im an junior and this project is my degree, i wanted to use docker to say that im running a virtual machine, not an xampp server.

I Installed it and enabled “virtualization” on my mother board

I open my project with this command docker-compose up -d in the terminal , and run my project with this link http://localhost:81.

what can i do with my computer to run it fast?

help us to help you: please provide more details about what you try to do and how you do it.

So far we don’t know what os you use, which docker engine version you run, how you create your image and/or start the container.

So I`m using windows 10. I don’t use images/containers. I open my project in phpstorm terminal with this command docker-compose up -d.

Just out of curriousity: what do you think does docker-compose up -d?

Anyway, I neither use Docker on Windows, nor do I feel that your remotely shared enough information (like the content of your docker-compose.yml?!) to get an idea where things go wrong.

I hope someone else is able to make sense of what you posted so far. Good luck!

Hi, i have the same problem, my project this simulator for WAMP, but my project is very slow.

look my docker-compose.yml:

version: "3"

services:
  webserver:
    build:
      context: ./bin/webserver
    container_name: 'my-webserver'
    restart: 'always'
    ports:
      - "80:80"
      - "443:443"
    links:
      - mysql
    volumes:
      - ${DOCUMENT_ROOT-./www}:/var/www/html
      - ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
      - ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
      - ${LOG_DIR-./logs/apache2}:/var/log/apache2
    networks:
      - web-db-net
  mysql:
    build: ./bin/mysql
    container_name: 'my-mysql'
    command: --default-authentication-plugin=mysql_native_password
    restart: 'always'
    ports:
      - "3306:3306"
    volumes:
      - ${MYSQL_DATA_DIR-./data/mysql}:/var/lib/mysql
      - ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql
    environment:
      MYSQL_ROOT_PASSWORD: tiger
    networks:
      - web-db-net
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: 'my-phpmyadmin'
    links:
      - mysql
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    ports:
      - '8080:80'
    volumes:
      - /sessions
    networks:
      - web-db-net
  # adminer:
    # image: adminer
    # container_name: 'my-adminer'
    # restart: always
    # ports:
      # - 8080:8080
    # environment:
      # ADMINER_DEFAULT_SERVER: mysql
    # networks:
      # - web-db-net

networks:
  web-db-net: