INCATools / ontology-development-kit

Bootstrap an OBO Library ontology
http://incatools.github.io/ontology-development-kit/
BSD 3-Clause "New" or "Revised" License
219 stars 54 forks source link

Fix build on M1 architecture. #871

Closed gouttegd closed 1 year ago

gouttegd commented 1 year ago

It seems that in recent versions of Docker, the --platform option of docker build no longer accepts a single architecture name as its argument (as in --platform arm64). Instead, a tuple specifying both the operating system and the architecture (e.g. linux/arm64) should be used.

Using --platform arm64 now causes Docker to fail building the ODK on arm64 Apple machines because it can’t find the arm64 variant of Ubuntu (our base image) anymore.

So this PR updates all the Makefiles to make sure they only use the new os/arch syntax.

matentzn commented 1 year ago

I don't know anything about these things, but why is it not necessary to specifically add something like mac/arm64?

gouttegd commented 1 year ago

The OS part of the platform refers to the system we run in the image, not the system the image runs on. So for the ODK, it’s always linux. :)

gouttegd commented 1 year ago

I admit it is confusing, because the architecture part does refer to the architecture the image is supposed to run on!