Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document image SHAs, avoid build duplication #11

Merged
merged 5 commits into from
Jul 26, 2017
Merged

Conversation

solsson
Copy link
Owner

@solsson solsson commented Jul 26, 2017

Docker's tagging conventions are hard to use. In particular it's difficult to trace a @sha256: back to the build and thus the source revision. But you do want the checksums because:

  • You typically have little control over when your environments pull. For example Kubernetes will by default reuse images, but if you add a node it will pull a fresh one.
  • A mistake or attack may re-build the tag with modifications and thereby inflict pain.

In addition, with this repo relying on Docker Hub's automated build feature, each tagged build will be a duplicate of the concurrent :latest (different checksums, identical behavior).

You can get reasonable transparency with for example solsson/kafka:0.11.0.0@sha256:e09d493ae027bbe45d82dc5b9ceaae40adad23efb2936116b233b7dce48136ba but the problem is that such image identification isn't explicitly supported by Docker. If the tag is re-built (which is legit, and even implied in case of tags like 0.11.0) you'll get "manifest verification failed" at next pull. You could be forgiven for thinking that Docker would continue to use the old pull, but for that you have to omit the tag. While solsson/kafka@sha256:e09d493ae027bbe45d82dc5b9ceaae40adad23efb2936116b233b7dce48136ba is stable over time, your colleague has little chance of knowing which Kafka version you intend to run.

typically causes duplicates, leading to confusion whey you identify images using
SHAs (which you should for other people's builds).
@solsson solsson changed the title Avoid build duplication and document image SHAs Document image SHAs, avoid build duplication Jul 26, 2017
@solsson solsson merged commit 9691544 into master Jul 26, 2017
solsson added a commit to Yolean/kubernetes-kafka that referenced this pull request Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant