This content originally appeared on DEV Community and was authored by chauhoangminhnguyen
Introduction
Google Cloud Run (GCR) makes deploying a Docker image as easy as running it locally. GCR also includes customizable configuration options for managing services, simplifying the deployment process significantly.
Build Docker Image
The key step in deploying with a Docker image is successfully building that image. In this guide, we’ll use a NodeJS server Docker image created in this article. Follow the steps to build your Docker image (or use an existing one), and push it to Google Artifact Registry before proceeding.
Deploy Docker Image
To deploy a Docker image using Google Cloud Run, simply use the following command:
gcloud run deploy express-ts --image {docker image} --port {port container} --region {region id} --max-instances {number of instance} --allow-unauthenticated
- --image: is the link to the Docker image on Google Artifact Registry or Docker Hub
- --port: is the container port you are exposing
- --max-instances: is the number of instances
For example:
After a successful deployment, the Service URL will be created, and you can access it immediately to start using the service.
To list the available services, execute the following command:
To delete a service:
See you again in the next articles!
If you found this content helpful, please visit the original article on my blog to support the author and explore more interesting content.
Some series you might find interesting:
This content originally appeared on DEV Community and was authored by chauhoangminhnguyen

chauhoangminhnguyen | Sciencx (2024-09-14T14:00:00+00:00) Using Google Cloud Run to Deploy Docker Image. Retrieved from https://www.scien.cx/2024/09/14/using-google-cloud-run-to-deploy-docker-image/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.