Google Cloud Professional Cloud Developer Practice Test

Question: 1 / 400

What command can be used to deploy new services directly from source code in Cloud Run?

gcloud run deploy --source

The command gcloud run deploy --source is designed specifically for deploying services in Cloud Run directly from source code. When using this command, you simply specify the source code repository, and Google Cloud will automatically handle the building of the container image from that source code. This streamlines the deployment process, allowing developers to push updates without concerning themselves with the intermediate steps of building and deploying a Docker image manually.

The other commands mentioned are tailored for different contexts. Using --dockerfile implies you are deploying a service by directly referencing a Dockerfile, which requires that you already have a containerized version of your application ready. The --buildpack option is used to specify that a buildpack should be used to create the container image, which again presumes a level of pre-built configuration not necessary for a direct source code deployment. The command gcloud deploy from-source is not valid, as it does not conform to the recognized syntax of the gcloud command-line tool.

Therefore, gcloud run deploy --source is the most straightforward and efficient choice for deploying directly from source code in Cloud Run.

Get further explanation with Examzify DeepDiveBeta

gcloud run deploy --dockerfile

gcloud run deploy --buildpack

gcloud deploy from-source

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy