Google Cloud Professional Cloud Developer — Question 143
You recently developed a new application. You want to deploy the application on Cloud Run without a Dockerfile. Your organization requires that all container images are pushed to a centrally managed container repository. How should you build your container using Google Cloud services? (Choose two.)
Answer options
- A. Push your source code to Artifact Registry.
- B. Submit a Cloud Build job to push the image.
- C. Use the pack build command with pack CLI.
- D. Include the --source flag with the gcloud run deploy CLI command.
- E. Include the --platform=kubernetes flag with the gcloud run deploy CLI command.
Correct answer: C, D
Explanation
The correct answers are C and D. Using the pack build command with pack CLI allows you to build a container image without a Dockerfile, and including the --source flag with the gcloud run deploy command enables you to deploy directly from your source code. Options A and B are not applicable as they do not directly build the container image, while option E is incorrect because it specifies a Kubernetes platform, which is not relevant for Cloud Run.