Skip to content

Conversation

pilartomas
Copy link
Contributor

@pilartomas pilartomas commented Jul 8, 2025

Signed-off-by: Tomas Pilar thomas7pilar@gmail.com

Unfortunately, one can't simply enable build multi-platform image without pushing it. This is explained in https://docs.docker.com/reference/cli/docker/buildx/build/#load and further discussed in docker/buildx#65. I had to restructure the pipeline a bit.

@pilartomas pilartomas requested a review from crivetimihai as a code owner July 8, 2025 12:45
@pilartomas pilartomas force-pushed the feat-multiplatform-image branch from 6c1c6c0 to 069eec4 Compare July 8, 2025 13:03
@crivetimihai
Copy link
Member

crivetimihai commented Jul 8, 2025

Thank you, that's awesome! Could you also please take a look at the Makefile to see if some of the targets there need an update as well?

Will review, test and merge this PR after the 0.3.0 release (which gets tagged later today). It will likely be available as a tagged image with 0.3.1 (2025-08-15) or 0.4.0 (2025-08-22)

@pilartomas pilartomas force-pushed the feat-multiplatform-image branch from 069eec4 to 735b8eb Compare July 10, 2025 07:44
@pilartomas
Copy link
Contributor Author

pilartomas commented Jul 10, 2025

There seems to be a certificate problem within the arm64 build. I must look into it further.

@pilartomas pilartomas force-pushed the feat-multiplatform-image branch 2 times, most recently from 32481fd to cc64d21 Compare July 10, 2025 10:40
@pilartomas
Copy link
Contributor Author

It appearch that the builder stage doesn't work properly for ARM64 setup. The surface error is about missing /bin/sh but resolving that by pre-installing bash only leads to another issue with repositories.

What's strange is that everything builds just fine on my local machine (M1).

I don't think I'll be able to resolve it myself without large changes in the containerfile but that might break some other functionality I am unaware of.

@pilartomas pilartomas force-pushed the feat-multiplatform-image branch 2 times, most recently from cc64d21 to 954c962 Compare July 10, 2025 12:13
@crivetimihai
Copy link
Member

Need to look at this in context of #80

Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
@pilartomas pilartomas force-pushed the feat-multiplatform-image branch from 954c962 to 367958a Compare July 28, 2025 13:43
Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
@manavgup
Copy link
Collaborator

manavgup commented Oct 3, 2025

Reviewing.

manavgup added a commit that referenced this pull request Oct 4, 2025
- Add trigger test file to manually test GitHub Actions workflows
- This will test the multiplatform Docker build implementation
- Addresses PR #322 and Issue #80 for ARM64 support
manavgup added a commit that referenced this pull request Oct 4, 2025
## 🚀 Multiplatform Docker Support Implementation

### Core Changes:
- ✅ **Containerfile.lite**: Fixed ARM64 compatibility issues
  - Changed SHELL from /bin/bash to /bin/sh for ARM64 UBI compatibility
  - Explicitly install bash in builder stage
  - Added --setopt=skip_if_unavailable=1 for robust ARM64 builds

- ✅ **GitHub Actions Workflows**: Updated for multiplatform builds
  - docker-image.yml: Added --platform linux/amd64,linux/arm64 support
  - docker-release.yml: Updated to use docker buildx imagetools for manifest lists
  - ibm-cloud-code-engine.yml: Added multiplatform build support

- ✅ **Makefile**: Enhanced with multiplatform build targets
  - container-build-multi: Build and push multiplatform images
  - container-build-multi-local: Local multiplatform builds for testing
  - Added proper buildx builder configuration

- ✅ **Documentation**: Comprehensive testing and implementation guide
  - MULTIPLATFORM-DOCKER-SUPPORT.md: Complete testing documentation
  - test-multiplatform.yml: Workflow for manual testing

### Key Features:
- 🏗️ Multi-platform builds: linux/amd64,linux/arm64
- 🔧 ARM64 compatibility fixes for UBI base images
- 🚀 CI/CD integration with all Docker workflows
- 📚 Comprehensive testing documentation

### Testing Results:
- ✅ Local ARM64 builds successful on Apple Silicon
- ✅ FastAPI application loads correctly
- ✅ All dependencies properly installed
- ✅ GitHub Actions workflows validated

### Addresses:
- Closes #80: Feature Request for multi-architecture container support
- Addresses PR #322: Create multiplatform image implementation

Ready for production deployment with full ARM64 and AMD64 support.
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.

3 participants