Skip to content

Build Fails on ARM (aarch64) Architecture with "exec format error" #12

@themightygan

Description

@themightygan

Hello Freddy,

First of all, thank you for this great project!

I tried to install the AI Launchkit on a Hetzner Cloud Server running Ubuntu 24.04 LTS, but ran into persistent build issues. After a very long debugging session, we identified the root cause and a permanent solution.

Environment:
Provider: Hetzner Cloud
Operating System: Ubuntu 24.04 LTS
Architecture: aarch64 (ARM)

Problem Description: When running docker compose build, the process fails for several services (e.g., bolt, perplexica, calcom) with an exec format error .

Root Cause: The Docker build system on this specific ARM machine incorrectly tries to pull amd64 base images for services that use a generic FROM node:xx-slim instruction in their Dockerfile. This leads to the architecture mismatch error.

Proposed Solution: To make the build process more robust across all architectures, the Dockerfiles for the affected services should be modified to explicitly use the build platform. This can be achieved by adding the --platform=$BUILDPLATFORM flag to the FROM instructions.

Here are the specific changes needed:
File: docker/bolt-diy/Dockerfile
Current: FROM node:20-slim
Proposed: FROM --platform=$BUILDPLATFORM node:20-slim
File: perplexica/app.dockerfile
Current: FROM node:20.18.0-slim AS builder
Proposed: FROM --platform=$BUILDPLATFORM node:20.18.0-slim AS builder
File: calcom-docker/Dockerfile
Line 1 (Current): FROM node:18 AS builder
Line 1 (Proposed): FROM --platform=$BUILDPLATFORM node:18 AS builder
Line 79 (Current): FROM node:18 AS runner
Line 79 (Proposed): FROM --platform=$BUILDPLATFORM node:18 AS runner

Implementing these changes should resolve the build issues on ARM architectures without affecting amd64 users.

Thank you for your work on this project!

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions