Skip to content

Adapt build script to aarch64 platform#743

Closed
midzelis wants to merge 1 commit intomaxking:mainfrom
midzelis:main
Closed

Adapt build script to aarch64 platform#743
midzelis wants to merge 1 commit intomaxking:mainfrom
midzelis:main

Conversation

@midzelis
Copy link
Copy Markdown

@midzelis midzelis commented Feb 5, 2025

Accidentally deleted the fork for #741, so this is a resubmission of that PR from a fresh fork

I need to use mailman on a Hetzner cloud instance. The images are not multi-arch, so I adapted the builds script to run multi-arch docker builds.

I ran into problems compiling the latest uwsgi (2.0.28) - (or one of its plugins, since postorius seemed to compile just fine on 2.0.28). This was fixed by pinning uwsgi to 2.0.25 for the mailman-web docker image.

@domdorn
Copy link
Copy Markdown

domdorn commented Feb 19, 2025

@maxking is it possible that, as @nathanfredericks already approved this, you have a merge button available? if yes, please click it :-)

@wb7
Copy link
Copy Markdown
Contributor

wb7 commented Feb 26, 2025

I've built this using build.sh on a Hetzner ARM64 cloud container. It will always restart:
root@debian-4gb-hel1-1:~/docker-mailman# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 725e9b211c6e maxking/mailman-web:rolling "docker-entrypoint.s…" 28 seconds ago Restarting (255) Less than a second ago mailman-web 6ed9b7cfa502 maxking/mailman-core:rolling "docker-entrypoint.s…" 28 seconds ago Restarting (255) 1 second ago mailman-core c49575ac7720 postgres:12-alpine "docker-entrypoint.s…" 28 seconds ago Up 27 seconds (healthy) 5432/tcp docker-mailman-database-1 b6da9c29b617 moby/buildkit:buildx-stable-1 "buildkitd --allow-i…" 2 minutes ago Up About a minute buildx_buildkit_multiarch0

The logs show the problem:

root@debian-4gb-hel1-1:~/docker-mailman# docker logs mailman-web exec /usr/local/bin/docker-entrypoint.sh: exec format error exec /usr/local/bin/docker-entrypoint.sh: exec format error exec /usr/local/bin/docker-entrypoint.sh: exec format error exec /usr/local/bin/docker-entrypoint.sh: exec format error exec /usr/local/bin/docker-entrypoint.sh: exec format error

So I've changed the PLATFORM_TO_LOAD var to "linux/arm64" instead of x86 and started everything under the rolling tag. Now it's running. I suppose, the x86 platform is because of the CI/CD?

PLATFORM="${PLATFORM:-linux/arm64/v8,linux/amd64}"
# Platform to load into docker after build
# Can only load one platform, should match host
PLATFORM_TO_LOAD="linux/amd64"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we figure out the current platform instead of hard coding it? Or, at least provide a way to override it using env var so someone can run builds on non-x86 machines too?

Also, let's rename the vars as BUILD_PLATFORM and CURRENT_PLATFORM instead? I don't think PLATFORM_TO_LAOD not matching the current platform would really work.

wb7 added a commit to wb7/docker-mailman that referenced this pull request Feb 26, 2025
@wb7
Copy link
Copy Markdown
Contributor

wb7 commented Feb 26, 2025

I've opened #749 to address @maxking's ideas.

@maxking
Copy link
Copy Markdown
Owner

maxking commented Mar 8, 2025

Closing in favor of #749

@maxking maxking closed this Mar 8, 2025
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

Successfully merging this pull request may close these issues.

5 participants