Google Cloud Professional Cloud Developer — Question 33
You are using Cloud Build build to promote a Docker image to Development, Test, and Production environments. You need to ensure that the same Docker image is deployed to each of these environments.
How should you identify the Docker image in your build?
Answer options
- A. Use the latest Docker image tag.
- B. Use a unique Docker image name.
- C. Use the digest of the Docker image.
- D. Use a semantic version Docker image tag.
Correct answer: C
Explanation
The correct answer is C, as using the digest of the Docker image provides a unique and immutable reference to a specific image, ensuring consistency across environments. Options A and D may lead to using different images if tags change over time, while option B does not guarantee that the image is the same across deployments.