-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M1 Laptops cannot run all features of govuk-docker #561
Comments
The good news here is that none of the GOV.UK apps are dependent on MySQL < 8. There's a ticket on the database migration board to remove the MySQL 5.6 service from the docker compose configuration. Right now it's still defined but unused/redundant. |
Thanks for opening the issue here and sorry that this issue has caught you at the time of you onboarding. I've put in a request with IT for an M1 machine myself to see if I can help (or at least experience the pain) |
Additional:
Seems a lot of this we can fix by upgrading to the latest version of the gems we rely on, however some of it may be bespoke for our environment. |
Per @Tetrino 's suggestion I've made a branch that we can use as a fake main for M1 changes: https://github.com/alphagov/govuk-docker/tree/m1-investigation If we make M1-related changes, we can branch from there and PR into there and we'll have a handy way of 1) getting the fixes we need and 2) comparing the changes with main. |
#564 - PR for fixing the dnsmasq problem. |
Note for related apps Apart from the things required to get govuk-docker working at all, any app you want to run needs to have:
(The last two items remove spring and inotify autorestart in development mode, so they're not entirely ideal. Possibly there should be some boilerplate to allow them on intel systems). |
This looks like it's linked to inotify. If you bash into a running app's container and try to run google-chrome-stable, it fails with a coredump about inotify:
|
Are these problems when trying to run the tool through a compatibility tool (rosetta or similar) and an x86 architecture or are you compiling the images with an arm64 arch? |
These are when I force amd64 builds for the app container (not necessarily on the other containers) by
(So they're running through rosetta, I believe) Without the --platform, google-chrome-stable won't install at all, with it it installs, but then won't run (because of inotify I think). The other option is remove the --platform tag and include chromium rather than google-chrome-stable, but the webdrivers used in gov_uk test seem not to be able to find nor use chromium. |
I found that I am able to build using the following changes: #569 There's still errors for me to work through but build seems to "mostly" finish |
@DilwoarH I think you can simplify that slightly by just editing Dockerfile.govuk-base and changing the line
...to....
This forces all the app images to be built in amd64 (rather than specifying each one in its compose file), and turns off spring in any app that uses it (because spring relies on inotify, which doesn't work under qemu). For any individual app you want to run you'll then need to bump it to ruby 2.7.5 (uncontroversial, because lots of them are being bumped to that anyway at the moment), and disable the listen gem (which uses inotify). I haven't come up with a nice way to disable listen at the base the way spring is disabled, sadly. |
Another option is to use |
PR to fix the chrome issues: #576 |
I found I didn't need to set anything up to build things for amd64 - it just worked like that by default? |
Current state of affairs (mostly good): Thanks to everyone's hard work, we're now at a stage where mostly everything works on M1 laptops. If you have one, you can proceed just as everyone else does, with the following exceptions:
Not govuk-docker, but to record somewhere:
|
We released govuk_test v3.0.0 today 🚀 The |
This replaces all usages of elasticsearch-6 with elasticsearch-7, as per the suggestion Keith made in: #561 (comment) I've not actually tested any of this functionality so can't guarantee it works.
I've put together a branch that should contain all the known fixes (thanks @KludgeKML, they're mostly yours) that collates what we know so far: #581 |
This replaces all usages of elasticsearch-6 with elasticsearch-7, as per the suggestion Keith made in: #561 (comment) I've not actually tested any of this functionality so can't guarantee it works.
An issue to track findings on running govuk-docker on M1 Laptops.
Current issues:
The text was updated successfully, but these errors were encountered: