This repository demonstrates how to build multi-architecture Docker images (AMD64 and ARM64) using Docker Buildx and deploy them to Google Cloud Run (for AMD64 only). The ARM64 build intentionally fails during deployment to Cloud Run, as ARM64 is not supported by Cloud Run, to explore Docker multi-architecture builds for learning purposes.

This project focuses on:
- Building Docker images for both AMD64 and ARM64 architectures using Docker Buildx.
- Deploying the AMD64 image to Google Cloud Run.
- Studying and understanding multi-architecture builds by intentionally deploying ARM64, which fails as ARM64 is not supported in Google Cloud Run.
- Google Cloud Run: For serverless container hosting (AMD64 only).
- Google Artifact Registry (GAR): To store Docker images.
- GitHub Actions: For CI/CD workflows.
- Docker Buildx: To build multi-platform Docker images.
- Input: Source code is pushed to the
master
branch. - Pipeline Steps:
- Authenticate with Google Cloud.
- Build architecture-specific Docker images (
AMD64
andARM64
). - Push images to Google Artifact Registry (GAR).
- Deploy AMD64 image to Google Cloud Run.
- Attempt to deploy ARM64 image to Cloud Run, which fails due to lack of support.
The workflow file is located at .github/workflows/build-and-deploy-amd.yml
.
- Authenticate with Google Cloud using
google-github-actions/auth
. - Build an
AMD64
image using Docker Buildx. - Push the image to Google Artifact Registry.
- Deploy the containerized application to Google Cloud Run for
AMD64
.
The workflow file is located at .github/workflows/build-and-deploy-arm.yml
.
- Authenticate with Google Cloud using
google-github-actions/auth
. - Build an
ARM64
image using Docker Buildx. - Push the image to Google Artifact Registry.
- Attempt to deploy the containerized application to Cloud Run for
ARM64
(fails as ARM64 is unsupported).
This project is intentionally designed to:
- Understand and implement multi-architecture Docker builds using Docker Buildx.
- Explore the limitations of deployment platforms like Google Cloud Run (ARM64 is not supported).
- Simulate real-world scenarios where architecture constraints may arise during deployment.
- Google Cloud Project: Make sure you have a project set up.
- Google Artifact Registry:
- Create separate repositories for AMD64 and ARM64.
- Example repositories:
amd64-repo
arm64-repo
- GitHub Secrets: Configure the required secrets in your repository settings.
Add the following secrets to your GitHub repository:
Secret Name | Description |
---|---|
GCP_CREDENTIALS |
JSON key of your Google Cloud Service Account. |
GAR_REGION |
Region of your Google Artifact Registry (e.g., us-central1 ). |
PROJECT_ID |
Google Cloud Project ID. |
GCR_SERVICE_AMD |
Cloud Run service name for AMD64 . |
GCR_SERVICE_ARM |
Cloud Run service name for ARM64 . |
GAR_NAME_AMD |
Docker image name for AMD64 . |
GAR_NAME_ARM |
Docker image name for ARM64 . |
GAR_REPO_NAME_AMD |
Artifact Registry repository for AMD64 . |
GAR_REPO_NAME_ARM |
Artifact Registry repository for ARM64 . |
GCP_REGION |
Deployment region for Cloud Run (e.g., us-central1 ). |
After successful deployment, the services can be accessed at:
Architecture | Deployment Status | Deployment URL |
---|---|---|
AMD64 | Successful | https://<GCR_SERVICE_AMD>-<GCP_REGION>.a.run.app |
ARM64 | Failed (Expected) | N/A |
Replace <GCR_SERVICE_AMD>
with the Cloud Run service name and <GCP_REGION>
with the deployment region.
To avoid unnecessary charges:
- Delete the deployed AMD64 service from Google Cloud Run.
- Remove both AMD64 and ARM64 images from Google Artifact Registry.
- Delete unused Google Cloud resources.
Below are the Proofs that GCP doesnt supports the ARM64 architecture as of the repo published
Below are the url's that are generated by the usecase of this project
Architecture | Deployment Status | Deployment URL |
---|---|---|
AMD64 | Successful | https://archfleet-backend-amd64-97415322905.asia-southeast1.run.app/ |
ARM64 | Failed (Expected) | https://archfleet-backend-arm64-97415322905.asia-southeast1.run.app/ |
Below Images shows the Deployment being failed because of the ARM64 Architecture
Below Images shows the Deployment being Success because of the AMD64 Architecture
- Google Cloud for providing serverless deployment capabilities.
- Docker Buildx for enabling multi-platform image building.
- GitHub Actions for a smooth CI/CD experience.