Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 73 discussion

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

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?

  • 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.
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
LCL8338
Highly Voted 3 years, 5 months ago
C, since digests are immutable, whilst docker tags are mutable (hence not D). https://cloud.google.com/architecture/using-container-images
upvoted 20 times
...
dxxdd7
Highly Voted 3 years, 10 months ago
For me it's D, it's not a best practice to use image with the latest tag. And using the semantic version will ensure that all the environment use the exact same image with the wanted code.
upvoted 9 times
StelSen
3 years, 9 months ago
This is correct
upvoted 3 times
...
lxs
1 year, 11 months ago
You are not correct. The question is to ensure the images are the same not about docker image naming convention best practices. The only way to compare two images and say they are the same is digest hash. You can mistakenly tag two different images using the same semver tag.
upvoted 3 times
...
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: C
The best answer is C. Use the digest of the Docker image. Here's why: Docker Image Digest: A digest is a unique identifier for a specific Docker image. It's a cryptographic hash of the image's contents, ensuring that you're always deploying the exact same image across environments.
upvoted 1 times
thewalker
4 months, 1 week ago
Let's break down why the other options are less ideal: A. Use the latest Docker image tag: The latest tag is mutable. If you push a new image with the latest tag, it will overwrite the previous latest image. This can lead to inconsistencies across environments if different environments pull the latest tag at different times. B. Use a unique Docker image name: While using unique names can help with organization, it doesn't guarantee that you're deploying the same image across environments. You could accidentally push a different image with the same name, leading to inconsistencies. D. Use a semantic version Docker image tag: Semantic versioning is a good practice for managing software releases, but it doesn't guarantee that the image content is identical across environments. You could accidentally push a new image with the same semantic version but different content.
upvoted 1 times
...
...
santoshchauhan
8 months, 3 weeks ago
Selected Answer: C
C. Use the digest of the Docker image. When promoting Docker images across different environments in a CI/CD pipeline, it's crucial to ensure that exactly the same image is deployed to each environment. The most reliable way to identify a Docker image is by using its digest. Here's why using the digest is the best approach: The digest is a SHA256 hash of the image's content and configuration, which uniquely identifies an image. If anything about the image changes, the digest changes. This means that if you deploy an image by its digest, you are guaranteed to deploy the exact same image in each environment. Using the digest is more reliable than using tags like 'latest' or semantic versioning. Tags can be moved to point to different images, but digests are immutable. Once an image is pushed to a registry, its digest can never change.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: C
I would go with C.
upvoted 1 times
...
Teraflow
1 year, 8 months ago
Selected Answer: C
C. Use the digest of the Docker image. Using the digest of the Docker image is the most reliable way to ensure that the exact same Docker image is deployed to each environment. The digest is a hash of the image content and metadata, which is unique to each image. This means that even if the image is tagged with different versions or names, the digest will remain the same as long as the content and metadata are identical. On the other hand, using the latest Docker image tag or a semantic version tag may not guarantee that the exact same image is deployed to each environment. These tags are mutable and can be overwritten or updated, which could result in different images being deployed to different environments. Using a unique Docker image name could work, but it may be more difficult to manage and track multiple images with different names, especially if there are many environments or frequent updates.
upvoted 2 times
...
telp
1 year, 10 months ago
Selected Answer: C
Anser C because nees to be sure that the same image for the 3 envs. A tag version can be change between the deployment of the env.
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
Selected Answer: C
C. Use the digest of the Docker image. The digest of the Docker image is a unique identifier for the specific version of the image. By using the digest, you can ensure that the same exact version of the image is deployed to each environment. Using the latest tag or a unique image name may not necessarily guarantee that the same version is deployed, as these tags may change over time. Using a semantic version tag would only ensure that the same version is deployed if you follow a strict versioning policy and only update the image by incrementing the patch or minor version number.
upvoted 3 times
...
kisswd
1 year, 12 months ago
Selected Answer: C
C is the answer
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: D
D is correct
upvoted 2 times
...
szl0144
2 years, 6 months ago
C is 100% correct
upvoted 3 times
...
KillerGoogle
2 years, 9 months ago
Read the question, it asks to ensure that the 'same' Docker image is deployed to every environment, so to identify the docker image, we have to use digests
upvoted 4 times
...
nazonazonazo
2 years, 9 months ago
C is correct. another answers are not immutable.
upvoted 3 times
alex8081
2 years, 3 months ago
"By design, the Git commit hash is immutable and references a specific version of your software".. https://cloud.google.com/architecture/best-practices-for-building-containers
upvoted 1 times
...
...
syu31svc
3 years, 4 months ago
https://cloud.google.com/architecture/best-practices-for-building-containers#tagging_using_semantic_versioning Answer is D
upvoted 3 times
Rupo7
12 months ago
I vote for this. We are likely looking for the best-practice way to 'promote' an image through dev, test, and prod environments. It is normal to use a tag with standard naming convention to identify/select images to promote e.g. tag v1.0.0. Using the digest would work, but this is not normal practice.
upvoted 1 times
...
...
guidogiordano
4 years ago
for me the correct answer is A)
upvoted 5 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 ...