Skip to content

Instantly share code, notes, and snippets.

@its-dibo
Last active April 22, 2021 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save its-dibo/eb5cc46acf275d1ceb5a8ff31b5a12c0 to your computer and use it in GitHub Desktop.
Save its-dibo/eb5cc46acf275d1ceb5a8ff31b5a12c0 to your computer and use it in GitHub Desktop.
deploying to Google cloud run
# build the docker image
# tag with gcr.io/* to upload to google container registry
docker build . -t gcr.io/project-id/tag
# or tag an existing image
docker pull my-image
docker tag gcr.io/project-id/tag
# push the tagged image
docker push gcr.io/project-id/tag
# login to gCloud
gcloud auth login
# deploy the image to Google cloud run
# service name is a name for this service on cloud run from your choice
gcloud run deploy service-name --image gcr.io/project-id/tag
# or use the Google cloud console to create a service and deploy an image
# to automate the operation, select continous deployment
# https://console.cloud.google.com/run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment