-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
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:
- add explicit
--platform linux/amd64to theFROMcommands inutils/Dockerfile.build; and - add an explicit
DOCKER_DEFAULT_PLATFORM=linux/amd64hint to thedocker-startmake 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.