Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Google Cloud Certified Professional Cloud Developer · Google Cloud
Select 2 answers.
This question asks for 2 answers, but our data marks only 1. Compare with the community discussion below for the full answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
I will go with AD.
To build a container image and push it to Artifact Registry using Cloud Build, you should: Run gcloud builds submit in the directory that contains the application source code. This command will trigger Cloud Build to build the container image and push it to Artifact Registry. In the application source directory, create a file named cloudbuild.yaml that contains the instructions for building and pushing the container image. The file should contain the following steps: steps: -name: 'grc.io/cloud-builders/docker' args: ['build','-t','grc.io/$PROJECT_ID','app-name','.'] -name: 'grc.io/cloud-builders/docker' args: ['push','grc.io/$PROJECT_ID/app-name'] This file will be used by Cloud Build to build and push the container image.
B is incorrect because it uses the gcloud run deploy command, which is used to deploy a container image to Cloud Run, not to Artifact Registry. C is incorrect because it uses the gcloud container images add-tag command, which is used to add a tag to an existing container image in Container Registry, not to build and push a new container image to Artifact Registry. E is incorrect because it uses the gcloud app deploy command, which is used to deploy an application to App Engine, not to build and push a container image to Artifact Registry.