linux/arm64 - The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8)
Hi,
I started to execute on a planned mail server migration over to a new setup including mailman. That setup runs on a linux/arm64 machine. It seems that there are not images for that platform available.
! mailman-core The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s ! mailman-web The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s
The containers will be stopped, mailman can't be run. I also discovered the older issue which maybe was never solved: https://github.com/maxking/docker-mailman/issues/483
Are there any plans on adding support for this architecture in the near future?
Can you contribute arm64 version of the dockerfiles with CI code? I don't honestly know much about multi-platform dockerfiles and i'd love to keep them separate.
Unfortunately I'm not an expert on CI, but as much as I understand the current build process if running in a circleCI pipeline needs to be adapted to cover the multi-platform build. Maybe that is already wrong. Is there any other contributor who could support with this?
See also https://github.com/maxking/docker-mailman/pull/741
Also having this problem.
I have enabled amd64 emulation using
docker run --privileged --rm tonistiigi/binfmt --install all
the mailman-core container starts, however, the mailman-web container is in a kind of crash-loop where it exits and restarts right after something with uWSGI
e.g. docker logs -f mailman-web:
File “/usr/lib/python3.12/site-packages/django/contrib/sites/locale/hu/LC_MESSAGES/django.po” is already compiled and up to date.
File “/usr/lib/python3.12/site-packages/django/contrib/sites/locale/bg/LC_MESSAGES/django.po” is already compiled and up to date.
/opt/mailman-web
Compressing... done
Compressed 2 block(s) from 80 template(s) for 1 context(s).
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, openid, postorius, sessions, sites, socialaccount
Running migrations:
No migrations to apply.
Creating admin user domdorn ...
Superuser domdorn already exists
Setting list.xxx.com as the default domain ...
[uWSGI] getting INI configuration from /opt/mailman-web/uwsgi.ini
Been down the emulation route and landed in the same problem. I concluded that besides it not working it is also a very inefficient use of resources on a virtual server. Instead I migrated to an amd64 arch and mailman on that still requires some memory, which will not get better emulating it. In the meantime maybe @midzelis provided the solution for the arm64 images.
@maxking could you please review the PR of @midzelis and if acceptable, merge it and trigger a new release? Thank you!
@maxking Please +1 to the PR from @midzelis , I'd be more than grateful for migrating my Mailman to ARM
The PR ist merged, and building the rolling release using BUILD_PLATFORM=linux/arm64/v8 CURRENT_PLATFORM=linux/arm64 ./build.sh works currently. I am not an expert in Circle CI either, maybe someone can check, why circleCI is not building for ARM?
PUSH=yes ./build.sh
PUSH=yes CURRENT_PLATFORM=linux/arm64 ./build.sh
(first line for AMD/Intel, second for Arm)
Should both build and push a multiplatform image from my reading of the script. If the CI script later does a docker push, that is too late because the --load line has rebuilt single architecture image with the same tag, which will overwrite just pushed multi-arch image (if PUSH was used)
Looking at the deploy.py, I'm guessing this is what is happening, because the separate "docker push" in deploy.py will just push the current machines architecture image.