moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
406 stars 252 forks source link

Apple silicon m1 and Selenium #190

Closed georgmaisser closed 2 years ago

georgmaisser commented 2 years ago

We encountered problems with running the moodle-docker container on Apple Silicon. While we only get the AMD warning on most of the containers, Selenium is the one service which just doesn't start at all.

Can anybody please share how you got it to work? Thank you!

scara commented 2 years ago

Hi @georgmaisser, arch is ARM64 on your side and for some of the images used by this toolbox linux/arm64 is already available e.g. moodle-php-apache:8.0 or moodle-php-apache:7.4. Not the same for selenium/standalone-firefox, indeed: someone found some solutions and forks are available.

Would you mind to share the ENV VAR settings you used for your runs? Do you need to run functional tests or just plain PHPUnit ones?

TIA, Matteo

georgmaisser commented 2 years ago

Hi, thank your for answering.

We just use all the standard moodle-docker and we get the orange amd64 warning flag for the containers with mailhog, exttest & selenium. While the selenium container is running in principle, the service is not available and we can't run the behat tests (we would like to watch them with VNC).

Now you mention that there are forks addressing the problem. Could you point us to one? We were looking around but couldn't find something which really helped us.

scara commented 2 years ago

Hi @georgmaisser, I gave a quick look at https://github.com/SeleniumHQ/docker-selenium/issues/1076#issuecomment-865611754 and next comments : never tried by myself and I'm wondering if those "seleniarm" versions could be too recent for the purposes of this Moodle docker toolbox.

HTH, Matteo

georgmaisser commented 2 years ago

Hi, thank you @scara , that was actually the necessary hint and the new seleniarm works just fine in with the moodle-docker project.

We run it with MOODLE_DOCKER_BROWSER=chrome and just change the selenium.chrome.yml

version: "2"
services:
  webserver:
    environment:
      MOODLE_DOCKER_BROWSER: chrome
  selenium:
    image: "seleniarm/standalone-chromium:4.0.0-beta-1-20210215"
    volumes:
        - /dev/shm:/dev/shm

Probably it will also works with firefox: seleniarm/standalone-firefox:4.0.0-beta-1-20210215 Didn't try this yet, though.

Thanks everybody!

jamesmortensen commented 2 years ago

I pushed some of the ARM64 Docker Selenium images to Docker Hub. They can be found here: https://hub.docker.com/u/seleniarm. The previous ones were from February. The new ones include the noVNC component as well on port 7900.

stronk7 commented 2 years ago

I imagine that sometime soon.. we'll be moving to selenium 4 as default (once they solve some severe performance problems that were found recently).

In the meantime, note that the MOODLE_DOCKER_BROWSER env variable supports a tag (since #195 was merged few weeks ago, so you can use virtually any of the images available without a editing anything.

And yes, I hope they start building the ARM64 variants soon, thanks for sharing yours, @jamesmortensen !

I'm closing this now, thanks for all the feedback.

Ciao :-)

PS: BTW moodlehq/moodle-exttests recently became multi-platform, so one less in the list.