Does anybody have a set of instructions for setting up https://github.com/moodlehq/moodle-docker on a Windows machine and running Behat tests? Asking for a friend.
I am absolutely useless on Windows.
Does anybody have a set of instructions for setting up https://github.com/moodlehq/moodle-docker on a Windows machine and running Behat tests? Asking for a friend.
I am absolutely useless on Windows.
Hello,
It's a little bit tricky but you can use docker containers for Moodle on Windows with WSL :
To edit wsl distribution files from windows, i recommand to use VSCode with the WSL extension.
Have fun
Seb
@ECHO OFF # Setup the environment variables SET MOODLE_DOCKER_DB=mysql SET MOODLE_DOCKER_WWWROOT=D:\moodlesource\moodlefordocker SET MOODLE_DOCKER_SELENIUM_VNC_PORT=5900 SET MOODLE_DOCKER_BROWSER=chrome SET MOODLE_APP_VERSION=latest # Puts the config file into Moodle copy /y config.docker-template.php %MOODLE_DOCKER_WWWROOT%\config.php # Starts docker bin\moodle-docker-compose up -d
After that you can use the normal commands (with slashes changed for the windows parts from the instructions in the readme) for example
bin\moodle-docker-compose exec webserver php admin/tool/behat/cli/init.php
If you are not using the WSL version of docker it is much harder to get docker to actually start from what I remember (i.e. it required you to run some kind of docker-machine command to get the proper environment variables setup on Windows so that you could connect to the VM running docker)
I don't recall installing any specific Linux distro to get things to work with newer versions of Docker on Windows (but since I do mount windows directories into Docker it is probably not as fast as it could be)