Skip to content
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

make docker-start fails on an M1/arm64 Macbook PRO #186

Open
davidalpert opened this issue Apr 13, 2022 · 0 comments
Open

make docker-start fails on an M1/arm64 Macbook PRO #186

davidalpert opened this issue Apr 13, 2022 · 0 comments

Comments

@davidalpert
Copy link
Contributor

I recently cloned this repo on a new M1 MacBook with arm64 architecture and ran into an error when running make docker-start:

❯ make docker-start
GDBL_DATA_DIR= GDBL_LOG_LEVEL= GDBL_VERSION=latest docker-compose up
Creating network "godbledger_default" with the default driver
Pulling db (mysql:8)...
8: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
make: *** [docker-start] Error 1

I believe that there was another error during make docker-build where the build-in-docker failed because the build script assumed to find build/linux-arm64/godbledger (due to my host architecture and Docker Desktop defaults) but the build had produced build/linux-amd64/godbledger (or vice versa).

I have seen these kinds of errors many times since adopting this M1/arm64 MacBook. In many cases, vendors have not yet published ARM-compatible images of their products.

As a workaround, I propose that we:

  1. add explicit --platform linux/amd64 to the FROM commands in utils/Dockerfile.build; and
  2. add an explicit DOCKER_DEFAULT_PLATFORM=linux/amd64 hint to the docker-start make target

The first point should ensure that the docker-build target builds an AMD-compatible godbledger server image that can run under the same amd64 platform which the mysql seems to assume.

The second tells docker-compose to override the local platform defaults and start up the db and godbledger server both in amd64 mode.

darcys22 added a commit that referenced this issue Apr 14, 2022
GH-186 explicitly set docker platform to linux/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant