Drupal is extremely slow running in Docker on Windows

Created on 3 October 2022, over 1 year ago
Updated 4 August 2023, 11 months ago

Hi,
I created a docker container and drupal installation using the attached docker-compose.yml file
all drupal files on ./drupal/web were the exact same files we got from a previous installation using the same docker-compose file
those files are being tracked by git, we need to use that path on the file in order to be able to track any changes on the drupal installation folder on a windows machine running docker, because those changes are shared via git with other developers.

Docker desktop: v4.12.0
Docker engine version: v20.10.17
Drupal version: 9.5

Problem/Motivation

The problem is that when running drupal, everything is extremely slow, just a single click to any drupal link, like structure or any link is taking about 1 minute to load the page.

Is there anything wrong with that way to work.
Any clue about which could be the issue?

Thanks in advance!!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Closed: outdated

Version

10.1 ✨

Component
Other  →

Last updated 3 minutes ago

Created by

🇦🇷Argentina PabloVizzi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Yes I have installed drupal 9.50 using docker. But it is extremely slow taking more than a minute to load any page. Please suggest how can we improve its speed.
    used this docker file:

    version: '3'
    services:
    mysql:
    image: mysql:latest
    environment:
    - MYSQL_ROOT_PASSWORD=root
    drupal:
    image: drupal:9.5.0
    ports:
    - 8081:80
    volumes:
    - ./web:/var/www/html
    - ./vendor:/opt/drupal/vendor
    - ./composer.json:/opt/drupal/composer.json
    - ./composer.lock:/opt/drupal/composer.lock
    links:
    - mysql
    environment:
    - MYSQL_USERNAME=root
    - MYSQL_PASSWORD=root

  • 🇺🇸United States cilefen

    It’s almost certainly those bind mounts. Depending on the host operating system, bind mounts with lots of files—which Drupal has—can be excruciatingly slow.

Production build 0.69.0 2024