Add multi-platform Docker support for smoke-test-fake-backend #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andlinux/arm64
platforms:smoke-tests/images/fake-backend/src/docker/backend/Dockerfile
for Linux buildslinuxBackendImagePrepare
: Prepares Docker build contextlinuxBackendMultiPlatformImageBuild
: Builds multi-platform image locallylinuxBackendMultiPlatformImagePush
: Builds and pushes multi-platform imageBackward 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
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.