Configuring a Docker LAMPP server for PHP development on Windows Desktop

From Joomla! Documentation

This instructions are for Joomla! component development, for version 4 of Joomla!

Requirements[edit]

  • Windows 10 or 11 with WSL support
  • Install Docker Desktop on Windows
  • Install Git for Windows

Procedure[edit]

In a Windows 10/11 Desktop with requirements installed, do:

  • Open a git-bash terminal (you can use your personal editor choice with git support to do that too)
  • create a local repo:
    local-repo $ git init
  • create this directories inside this folder:
 $  mkdir -p src/admin
 $  mkdir -p src/site
  • Copy from docker hub the stack.yml code and adapt the code including in the joomla: section a new directive:
   volumes:
     - './src/admin:/var/www/html/administrator/components/com_helloworld'
     - './src/site:/var/www/html/components/com_helloworld'
  • Run the docker image with:
 $ docker compose -f stack.yml up -d
  • Access the joomla in your browser using localhosta address and 8080 port (this port can be changed in the stack.yml file) and run de Joomla configuration
  • Commit the initial code with:
 $ git add .
 $ git commit -am "Initial development environment"
 $ docker compose -f stack.yml stop
  • Remove the docker images with:
 $ docker compose -f stack.yml down


References[edit]

  • The official Joomla! docker image is on Docker Hub