exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 359 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 359
Topic #: 1
[All Professional Cloud Developer Questions]

You are deploying a containerized application to GKE. You have set up a build pipeline by using Cloud Build that builds a Java application and pushes the application container image to Artifact Registry. Your build pipeline executes multiple sequential steps that reference Docker container images with the same layers.

You notice that the Cloud Build pipeline runs are taking longer than expected to complete. How should you optimize the Docker image build process?

  • A. Add the --squash parameter to the Docker build steps to combine newly built layers into a single layer.
  • B. Configure Cloud Build to use a private pool in your VPC for pipeline executions.
  • C. Specify the cached image by adding the --cache-from argument in your build config file with the image as a cache source.
  • D. Store container artifacts on Cloud Storage. Configure Cloud CDN on the Cloud Storage bucket to enable caching on edge locations.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Pime13
4 weeks ago
Selected Answer: C
https://cloud.google.com/build/docs/optimize-builds/speeding-up-builds#using_a_cached_docker_image steps: - name: 'gcr.io/cloud-builders/docker' entrypoint: 'bash' args: ['-c', 'docker pull gcr.io/$PROJECT_ID/[IMAGE_NAME]:latest || exit 0'] - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/[IMAGE_NAME]:latest', '--cache-from', 'gcr.io/$PROJECT_ID/[IMAGE_NAME]:latest', '.' ] images: ['gcr.io/$PROJECT_ID/[IMAGE_NAME]:latest']
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...