Skip to content

Add multi-platform Docker support for smoke-test-fake-backend #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 1, 2025

This PR adds multi-platform Docker support for the smoke-test-fake-backend image to resolve startup timeout issues on ARM64 systems when using Testcontainers.

Problem

The smoke-test-fake-backend Docker image was only built for AMD64 architecture using Google Jib. On ARM64 systems, Docker needs to emulate the AMD64 image, which causes significant performance overhead and often leads to container startup timeouts (failing to start within 60 seconds during integration tests).

Solution

Added Docker Buildx support to build native images for both linux/amd64 and linux/arm64 platforms:

  • Created new Dockerfile: Added smoke-tests/images/fake-backend/src/docker/backend/Dockerfile for Linux builds
  • Extended Gradle build: Added new tasks for multi-platform builds:
    • linuxBackendImagePrepare: Prepares Docker build context
    • linuxBackendMultiPlatformImageBuild: Builds multi-platform image locally
    • linuxBackendMultiPlatformImagePush: Builds and pushes multi-platform image
  • Updated GitHub Actions: Enhanced workflows with Docker Buildx and QEMU setup for cross-platform compilation

Backward Compatibility

The existing Jib-based build process remains unchanged and functional. The new multi-platform builds run alongside the existing builds, ensuring no disruption to current workflows.

Testing

  • ✅ Multi-platform builds successfully create images for both AMD64 and ARM64
  • ✅ Container starts correctly and responds to health checks
  • ✅ Existing Jib builds continue to work as before
  • ✅ Gradle tasks execute without errors

ARM64 users will now get native performance instead of emulated performance, resolving the startup timeout issues.

Fixes #66.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] asdf Add multi-platform Docker support for smoke-test-fake-backend Aug 1, 2025
@Copilot Copilot AI requested a review from trask August 1, 2025 15:36
Copilot finished work on behalf of trask August 1, 2025 15:36
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.

asdf
2 participants