Add ARM64 Support for Docker Image to Enable Raspberry Pi 5 Compatibility #404
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.
Problem:
The application could not run in a Docker container on my Raspberry Pi 5 because the Docker image was only built for the
amd64
architecture. Since the Raspberry Pi 5 uses an ARM64 processor, it requires a Docker image built for thelinux/arm64
architecture.Solution:
Updated the GitHub Actions workflow (
docker-publish.yml
) to include ARM64 support by specifying bothlinux/amd64
andlinux/arm64
platforms in theplatforms
parameter of theBuild and push Docker image
step. This ensures that Docker images are built and published for both architectures.Changes Made:
docker-publish.yml
file:platforms: linux/amd64,linux/arm64
under thewith
section of theBuild and push Docker image
step.Testing:
Notes:
Dockerfile
since the base imageubuntu
supports multiple architectures, including ARM64.amd64
builds and maintains backward compatibility.Conclusion:
By adding ARM64 support, we expand the compatibility of our application to run on devices like the Raspberry Pi 5, making it accessible to a broader range of users.