Skip to content

Conversation

@ProgrammingPirates
Copy link
Contributor

@ProgrammingPirates ProgrammingPirates commented Nov 11, 2025

Rationale for Multi-Platform Support

1. Cause of Incompatibility:
The previous build process created images only for the host architecture (implicitly linux/amd64). This caused the Meshery Operator to fail with an "Exec format error" when run on modern ARM-based hardware (e.g., Apple Silicon or cloud instances like AWS Graviton). The single-architecture image was incompatible with the multi-architecture runtime environment.

2. Changes to Overcome Incompatibility:
To resolve this, I implemented a true multi-platform build strategy:

  • Docker Buildx Integration: Updated the GitHub Actions workflow to leverage docker buildx to build and push manifest lists for two architectures: linux/amd64 and linux/arm64.
  • Dynamic Dockerfile: Updated the Dockerfile to use the built-in variables $BUILDPLATFORM and $TARGETPLATFORM. This allows the build process to dynamically compile the application for the correct target architecture, eliminating the need for hardcoding.
  • Backward Compatibility: Added default values for local development using regular docker build.
    Fixes Add support for ARM with a multi platform workflow #355

- Update Dockerfile to support multi-platform builds using BUILDPLATFORM and TARGETPLATFORM
- Add default values for backward compatibility with regular docker build
- Update GitHub Actions workflow to use docker buildx for linux/amd64 and linux/arm64
- Simplify Makefile docker-buildx target to directly use updated Dockerfile
- Remove platform hardcoding and enable cross-platform builds

Fixes meshery#355

Signed-off-by: dharam <[email protected]>
@ProgrammingPirates
Copy link
Contributor Author

@leecalcote Could you review this PR?

@leecalcote
Copy link
Member

Squash your commits. There are entirely too many.

Explain how your changes make the embedded sqlite ARM compatible.

@leecalcote
Copy link
Member

Signoff on your commits.

@leecalcote
Copy link
Member

List the LLM model and version that you're using.

@ProgrammingPirates
Copy link
Contributor Author

ProgrammingPirates commented Nov 11, 2025

Squash your commits. There are entirely too many.

Explain how your changes make the embedded sqlite ARM compatible.

This change does not touch sqlite. the Meshery Operator doesn’t embed or link sqlite; its a controller binary built statically with CGO disabled and packaged on distroless. I only enabled multi-arch (linux/amd64, linux/arm64) builds via docker buildx. So ARM compatibility here is independent of sqlite

@ProgrammingPirates ProgrammingPirates force-pushed the add-arm-multi-platform-support branch from ccae5fa to d80e5fd Compare November 11, 2025 07:35
Copy link
Contributor Author

@ProgrammingPirates ProgrammingPirates left a comment

Choose a reason for hiding this comment

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

Done

Copy link

@lekaf974 lekaf974 left a comment

Choose a reason for hiding this comment

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

small comment LGTM otherwise

Signed-off-by: Dharmendra solanki <[email protected]>
@ProgrammingPirates
Copy link
Contributor Author

ProgrammingPirates commented Nov 14, 2025

@leecalcote pls review

@leecalcote
Copy link
Member

Where have you explained the cause of the incompatibility and the changes to overcome that cause?

@ProgrammingPirates
Copy link
Contributor Author

Where have you explained the cause of the incompatibility and the changes to overcome that cause?

@leecalcote I have updated the main PR description to include a structured explanation detailing the cause of the incompatibility and the changes to overcome it using Docker Buildx and dynamic platform variables. Please let me know if this clarifies things sufficiently for you!

@leecalcote
Copy link
Member

@ProgrammingPirates you're right about sqlite. When I first took a quick look, I thought this PR was on meshery/meshery.

@leecalcote
Copy link
Member

Join tomorrow's dev meeting. Add this PR as an agenda item, yeah?

@leecalcote
Copy link
Member

Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

@ProgrammingPirates, please reuse (copy/paste) our multi-platform.yml workflow (used broadly across Meshery repos) for ARM support - https://github.com/meshery-extensions/meshery-istio/blob/master/.github/workflows/multi-platform.yml

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.

Add support for ARM with a multi platform workflow

3 participants