Drupal 9 and Docker on Windows

  • I try do develop modules in Drupal9 using VSCode on Windows and Drupal 9 in a Docker Container (For that pupose, I am using the Docker for Drupal project)
  • on the Window side I get in my VSCode workspace the following structure:
PS C:UsersjeanpCONSULTANTdocker4drupal> dir


    RĂ©pertoire : C:UsersjeanpCONSULTANTdocker4drupal


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        30/07/2021     11:12                .github
d-----        31/07/2021     14:12                .vscode
d-----        30/07/2021     11:12                mutagen
d-----        30/07/2021     11:12                tests
d-----        22/07/2021     04:17                vendor
d-----        22/07/2021     04:17                web
-a----        30/07/2021     11:12              6 .dockerignore
-a----        30/07/2021     11:12           2300 .env
-a----        30/07/2021     11:12             26 .gitignore
-a----        30/07/2021     11:12            390 docker-compose.override.ym 
                                                  l
-a----        31/07/2021     14:25           9789 docker-compose.yml
-a----        30/07/2021     11:12           3016 docker.mk
-a----        30/07/2021     11:12           1083 LICENSE.md
-a----        30/07/2021     11:12            137 Makefile
-a----        30/07/2021     11:12           9142 README.md
-a----        30/07/2021     11:12            423 traefik.yml

the web and vendor directories are copied from the php container!

  • On the windows side (Host) when I create a Hello World empty module under web/modules/custom/helo_world/hello_world.info.yml this one does not appear under http://drupal.docker.localhost:8000/admin/modules
    • and this although I defined a volume definition in the php container and the nginx container:
volumes:
    - ./:/var/www/html:cached

Source: Docker Questions

LEAVE A COMMENT