In documentation they say we can build and deploy container from cloud container registry to cloud run using cloudbuild.yaml file:
steps:
# Build the container image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/PROJECT_ID/IMAGE', '.']
# Push the container image to Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/PROJECT_ID/IMAGE']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args: ['run', 'deploy', 'SERVICE-NAME', '--image', 'gcr.io/PROJECT_ID/IMAGE', '--region', 'REGION', '--platform', 'managed']
images:
- gcr.io/PROJECT_ID/IMAGE
And we cal also pull image from docker hub in cloudbuild.yaml file like this :
steps:
- name: "maven"
args: ["mvn", "--version"]
I want to pull image from docker hub and build and deploy this image to cloud run using cloudbuil.yaml file but I don't know how to do that as I am new to docker and cloud run.