planner
planner copied to clipboard
Apple Silicon support for Docker
Building the application using Docker on Apple Silicon (M1, M2, etc) fails with the following error in the step where it attempts to install Google Chrome:
7.332 + apt-get install -y --force-yes google-chrome-stable --no-install-recommends
7.341 Reading package lists...
7.723 Building dependency tree...
7.805 Reading state information...
7.864 W: --force-yes is deprecated, use one of the options starting with --allow instead.
7.864 E: Unable to locate package google-chrome-stable
------
failed to solve: process "/bin/sh -c set -ex; wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && wget -q -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install -y --force-yes google-chrome-stable --no-install-recommends && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
By default, Docker will use images that match the host architecture (ie. linux/arm64/v8
on Apple Silicon). The above apt
repo does not have an ARM version of Google Chrome.
This PR addresses the problem by making it explicit that Docker should always use the linux/amd64
versions of images.
It also addresses another Apple Silicon-related error message and a bundler-related warning. See the individual commit messages for more details.
Note that the main goal of this PR is to get building of the project to complete via Docker.
I have rebased this PR against the latest codebar/planner
code and tested it on my M1 machine and it still works as expected.
@matyikriszta Is there anything I can do to help towards getting this PR merged?
Hi @biggianteye
Nice work. Indeed current state of the docker file is not working on Mac M_x machines.
Firstly, I thought maybe we could instead of changing platform allow it to be native and install an appropriate google chrome version from chrome for testing site
But as the browser inside docker is only used for testing and from my perspective it's ok to use builtin chrome version (as it's quite fresh and is not drastically different in terms of web standards).
So, I made a PR where I simply remove this line from the Dockerfile.
Not sure what is better though.
@biggianteye thanks for your patience, this is on our radar and we'll do our best to test and approve as soon as possible
@biggianteye thanks for your work on this. I've opened a PR at https://github.com/codebar/planner/pull/2103 that fixed up the following issue in a slightly different way. If that PR gets approved and merged I'm going to close this one. I appreciate you following up on this issue.