Guide: How to Host a Containerized App on Google Cloud Run

Kavikumar

Kavikumar

· 2 min read
Guide: How to Host a Containerized App on Google Cloud Run

Thinking about deploying your Dockerized app without breaking a sweat? Google Cloud Run is a fully managed platform that automatically scales your containerized applications, letting you go from code to a live URL in minutes—no infrastructure stress, no fuss!

Prerequisites

Before jumping in, ensure you have:

  • A Google Cloud account (sign up free)
  • The gcloud CLI installed and initialized
  • Docker installed on your computer
  • Your app containerized with a working Dockerfile

Step 1: Write Your Dockerfile

Step 2: Build & Push Your Docker Image

Use Cloud Build to build and push your image directly to Google Container Registry (GCR):

bashgcloud builds submit --tag gcr.io/<PROJECT-ID>/<IMAGE-NAME>

Example:

bashgcloud builds submit --tag gcr.io/my-gcp-project/my-app

Replace my-gcp-project and my-app with your actual project ID and app name.

Step 3: Deploy to Cloud Run

Once your image is pushed, deploy with:

bash: gcloud run deploy my-app \ --image gcr.io/<PROJECT-ID>/<IMAGE-NAME> \ --platform managed \ --region us-central1 \ --allow-unauthenticated

Flag breakdown:

  • --platform managed: Use Cloud Run’s fully managed environment
  • --region: Pick the region closest to your users
  • --allow-unauthenticated: Make your app public (optional—omit for private services)

Step 4: Access Your Live Application

On successful deployment, you’ll get a URL like:

https://my-app-abc123.a.run.app

Open it up—your app is live and running on Google Cloud Run!

Bonus Tips

  • Autoscaling: Cloud Run scales to zero when idle, saving you money.
  • Environment Variables: Use --set-env-vars KEY=value during deployment.
  • Secrets & IAM: Integrates with Secret Manager and IAM for secure access management.

Google Cloud Run removes all the hurdles from container deployment. Whether you’re building an API, a full app, or microservices, Cloud Run has you covered. Enjoy peace of mind with serverless scaling, easy updates, and a simple developer experience.

Ready to go Cloud Native? Start simple—scale effortlessly!

Kavikumar

About Kavikumar

Tech enthusiast with 6+ years of experience in full-stack development, cloud computing, and scalable system design. Passionate about building clean, efficient solutions using Node.js, React, Postgres, and AWS.

Copyright © 2025 Softplexai.com. All rights reserved.
Privacy&Policy·Terms· About-us· Contact