Deploy container Cloud Run services is the fastest route from a working Docker image to a production URL, because Cloud Run removes the cluster management that normally comes with containers. There is no node pool to size, no ingress controller to install, and no scaling policy to tune by hand: you give Cloud Run an image, it runs it, scales it to zero when idle, and scales it out when traffic arrives. That simplicity is real, but it comes with a contract your container must honour, mainly listening on the port Cloud Run assigns and starting quickly. This guide builds an image, pushes it to Artifact Registry, deploys it, controls traffic between revisions, and fixes the startup errors that stop most first deployments.
Cloud Run has two environments, fully managed and on Anthos, and this guide uses fully managed, which is the serverless option most teams want. A service is the unit of deployment, a revision is an immutable snapshot of a deployed configuration, and traffic is split between revisions by percentage. That model matters for safe releases: deploying a new revision does not immediately replace the old one, it creates a candidate you can send a fraction of traffic to, watch, and then promote or roll back. If you are choosing between Google Cloud container options, our guide to GKE Autopilot versus Standard mode explains when a full Kubernetes cluster is worth its extra complexity and when Cloud Run is the better fit.

Prerequisites
You need a Google Cloud project with billing enabled, the gcloud CLI installed and authenticated, and Docker installed locally or access to Cloud Build. You need permission to create Artifact Registry repositories and Cloud Run services, which the Owner or Editor role provides, or the specific Cloud Run Admin and Artifact Registry Writer roles for a least-privilege setup. The examples deploy a small web service that listens on the PORT environment variable; if your application hardcodes a port, change it before deploying, because Cloud Run will not guess.
Deploy Container Cloud Run: Build and Push the Image
Create an Artifact Registry repository in the region you will deploy to, then build and push the image there. Keeping the registry and the service in the same region avoids cross-region pull latency and keeps the architecture simple to reason about. The image tag should include a version or commit SHA rather than only latest, because latest is a moving target that makes rollbacks ambiguous.
gcloud artifacts repositories create myrepo \
--repository-format=docker \
--location=us-central1
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build -t us-central1-docker.pkg.dev/PROJECT_ID/myrepo/web:v1 .
docker push us-central1-docker.pkg.dev/PROJECT_ID/myrepo/web:v1
Replace PROJECT_ID with your Google Cloud project ID. If Docker is not available locally, Cloud Build can build from source with gcloud builds submit, which produces the same Artifact Registry image without a local daemon. Either way, the result is an image in a private registry that Cloud Run can pull without public exposure, which is the correct default for application code. The official Google Cloud documentation on deploying to Cloud Run lists the deployment flags for every language and framework, including the port and health-check behaviour described below.
Deploy Container Cloud Run: Deploy and Control Traffic
Deploy the image as a service, choosing whether it is public or private. The allow-unauthenticated flag makes the service reachable by anyone with the URL, which is right for a public website and wrong for an internal API. For an internal service, omit that flag and grant the run.invoker role only to the identities that should call it. Set memory, CPU, and maximum instances to bound cost: a service with no maximum can scale to the platform limit during a traffic spike or a retry storm, and that bill arrives after the incident.
gcloud run deploy web \
--image=us-central1-docker.pkg.dev/PROJECT_ID/myrepo/web:v1 \
--region=us-central1 \
--allow-unauthenticated \
--memory=512Mi --cpu=1 --max-instances=10 \
--set-env-vars=APP_ENV=production
The command prints the service URL when it succeeds. Test it with curl, then deploy a second revision and split traffic to prove the rollback path works before you need it. The update-traffic command below sends ten percent of traffic to the new revision and keeps ninety percent on the old one; watch logs and error rates, then promote to one hundred percent or roll back by sending all traffic to the previous revision. For load balancing and HTTPS in front of Cloud Run, see our guide to Google Cloud load balancer HTTPS setup, which adds a global frontend when a single regional URL is not enough.
gcloud run deploy web --image=us-central1-docker.pkg.dev/PROJECT_ID/myrepo/web:v2 --region=us-central1
gcloud run services update-traffic web --region=us-central1 --to-revisions=web-00002=10,web-00001=90
gcloud run services describe web --region=us-central1 --format="value(status.url)"
Troubleshooting
When a deployment fails with a container-failed-to-start error, the cause is almost always the port. Cloud Run sets the PORT environment variable, defaulting to 8080, and the container must listen on that port on all interfaces within the startup timeout. An application that listens on localhost only, or on a hardcoded port such as 3000, will fail health checks even though it runs fine locally. Change the application to read PORT from the environment and bind to 0.0.0.0, then redeploy.
When a deployed service returns 403, the service is private and the caller lacks the run.invoker role, or the request carries no identity at all. For a public service, redeploy with allow-unauthenticated; for a private service, grant the role to the calling service account and confirm the caller sends an identity token. When a service starts but requests time out, check the startup time and the concurrency setting: a container that takes longer than the startup timeout to become ready will be killed and restarted in a loop, and a single-threaded application with high concurrency will queue requests until they time out. Lower concurrency to match the application threading model, and keep startup fast by avoiding heavy work before the server starts listening.
Conclusion
A deploy container Cloud Run setup done well builds a versioned image, push it to Artifact Registry in the same region, deploy with explicit resource limits and the correct authentication setting, and prove the traffic-split rollback before your first real incident. Cloud Run rewards containers that start fast, listen on PORT, and stay stateless, and it punishes hardcoded ports and unbounded scaling. Follow that contract, and the platform handles the rest.