Your Cloud Build pipeline builds a Python app and deploys to Cloud Run. To reduce deployment time and unnecessary steps, what should you change?
Choose an answer
Tap an option to check your answer.
Correct answer: Add the --cache-from argument to the Docker build step in the build config..
Why this is the answer
Adding the --cache-from argument to the Docker build step is the most effective way to reduce build time for a Python app in Cloud Build. This argument allows Docker to reuse layers from previously built images, significantly speeding up subsequent builds when only minor code changes occur. Removing the push to Artifact Registry is incorrect because Cloud Run requires a container image, which must be stored in a registry. Deploying a new Docker registry in a VPC and using worker pools is an overly complex solution that doesn't directly address build time optimization for image layers. Storing image artifacts in Cloud Storage is not a standard or efficient method for managing Docker images for Cloud Run deployments.
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