Closed vishnugopal closed 2 years ago
Ping for help reviewing! cc Francesco Bigiarini Jeroen Pfeil when you get time!
From Francesco Bigiarini: @vishnugopal I'm taking a look now
Check my comment regarding a possible multi-arch Dockerfile.
This definitely seems like the better way to approach this, when I first looked at multi-arch builds, I thought it was possible only with multiple Dockerfiles, but I dug in and found an example here that seems to work. I'll try adapting this to use TARGETARCH, thanks much for the review! :)
@vishnugopal I think that it can be something like this:
RUN if [ "$TARGETARCH" = "arm64" ]; then \
apt-get install -y chromium; \
else \
apt-get install -y google-chrome-unstable; \
fi;
Or something similar. Maybe you can use an ARG
where you store which chromium variant to install and override it at runtime when you are in an M1 chipset.
@zaerl Can you review? I've made the changes based on your suggestions and that made the PR smaller :)
Think I broke x86 somehow with the latest fixes. I'll need to get access to an x86 machine to test this there :-/
From Francesco Bigiarini: I have a x86 machine if you want, I ran the tests a minute ago on my M1 without problems
The code seems ok, I don't know why it timeout. Maybe we should just up jest timeout to 10 and try again.
Francesco Bigiarini Yay! Thank you!
This fixes M1 Mac compatibiliity while retaining the behaviour in non-arm64 environments.
Fixes:
arch
=arm64
npm run stop:docker
to the stop npm task.To test (perform all steps in both an M1 Mac and an Intel Mac):
docker-compose logs -f
Also needs review from DevOps to make sure I haven't broken any production expectations!