You need to build a container for Cloud Run without a Dockerfile, and your organization requires all images to be pushed to a central container repository. Which steps should you use? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Use the pack build command (Cloud Native Buildpacks) via the pack CLI to produce the image., Use gcloud run deploy --source to build and deploy from source..
Why this is the answer
To build a container without a Dockerfile, you need a buildpack-based approach. The pack build command, part of the Cloud Native Buildpacks CLI, directly uses buildpacks to create an OCI-compliant image from your source code, which can then be pushed to any container registry. Alternatively, gcloud run deploy --source automates this process for Cloud Run. When you use --source, Cloud Run leverages Cloud Build and buildpacks to containerize your application and push the resulting image to Container Registry (or Artifact Registry, if configured) before deploying it. Pushing source code directly to Artifact Registry is incorrect because Artifact Registry stores artifacts, not source code for building. gcloud run deploy with --platform=kubernetes is incorrect because --platform=kubernetes specifies the deployment target, not the build method, and it doesn't inherently build from source without a Dockerfile.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed