0
0
GCPcloud~15 mins

Deploying container images in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Deploying container images
📖 Scenario: You work at a small company that wants to deploy a simple web application using containers on Google Cloud Platform (GCP). You will learn how to prepare and deploy a container image to Google Cloud Run, a service that runs containers without managing servers.
🎯 Goal: Build a basic deployment configuration to run a container image on Google Cloud Run.
📋 What You'll Learn
Create a variable with the container image URL
Set a variable for the service name
Write the command to deploy the container image to Cloud Run
Add the region flag to the deployment command
💡 Why This Matters
🌍 Real World
Deploying container images to Cloud Run is a common task for running scalable web applications without managing servers.
💼 Career
Cloud engineers and developers often need to deploy containerized applications quickly and reliably using command-line tools like gcloud.
Progress0 / 4 steps
1
Set the container image URL
Create a variable called container_image and set it to the exact string gcr.io/cloudrun/hello which is the container image URL.
GCP
Need a hint?

Use a string variable to hold the container image URL exactly as shown.

2
Set the Cloud Run service name
Create a variable called service_name and set it to the exact string hello-service which will be the name of your Cloud Run service.
GCP
Need a hint?

Use a string variable to hold the service name exactly as shown.

3
Write the deployment command
Write a variable called deploy_command that contains the exact string gcloud run deploy hello-service --image gcr.io/cloudrun/hello to deploy the container image to Cloud Run.
GCP
Need a hint?

Use a string variable to hold the full deployment command exactly as shown.

4
Add the region flag to the deployment command
Update the deploy_command variable to include the region flag --region us-central1 at the end, so the full command is gcloud run deploy hello-service --image gcr.io/cloudrun/hello --region us-central1.
GCP
Need a hint?

Append the region flag to the existing deployment command string exactly as shown.