sitespeedio / plugin-lighthouse

Lighthouse plugin for sitespeed.io
MIT License
30 stars 19 forks source link

Docker example in docs for lighthouse run is hanging #136

Open tom-sanderson-bt opened 1 week ago

tom-sanderson-bt commented 1 week ago

Using the example in docs for running lighthouse ie

docker run --shm-size=1g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:35.2.0-plus1 https://www.sitespeed.io/

It is getting stuck at Start collecting Lighthouse results . I have asked someone else and they are also seeing the same.

Can you help with what the issue is?

Screenshot 2024-10-18 at 13 28 52
soulgalore commented 1 week ago

What OS are you using, is it a Mac ARM machine? I think the problem is that Google do not provide a Chrome/Chromium binary om arm64, so when Lighthouse installs Chrome, it gets a version that do not work on arm. For sitespeed.io we install a binary that is built for arm. You can try docker run --shm-size=1g --platform linux/amd64 --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:35.2.0-plus1 https://www.sitespeed.io/. To get it to work you need to turn on Rosetta AMD emulation checkout https://www.sitespeed.io/documentation/sitespeed.io/docker/#running-on-mac-m1-arm.

There's https://github.com/sitespeedio/sitespeed.io/issues/4302 that hopefully can fix so we run the laster Chromium version in the container but that will still only work for sitespeed.io since Lighthouse install its own Chrome version as it is now.