Hacker News new | ask | show | jobs
by timthelion 3716 days ago
Wait, they don't use hashes? Why???

    Image ID
        Each layer is given an ID upon its creation. It is     represented as a hexadecimal encoding of 256 bits, e.g., a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9. Image IDs should be sufficiently random so as to be  globally unique. 32 bytes read from /dev/urandom is sufficient for all practical purposes. Alternatively, an image ID may be derived as a cryptographic hash of image contents as the result is considered indistinguishable from random. The choice is left up to implementors.
1 comments

Maybe don't paste into a horizontal scrollbox so that you may see the whole thing?

It says:

>an image ID may be derived as a cryptographic hash of image contents

Using the crypto hash is something that we should probably fix up and enforce. Could you file a bug?

We just started the project last week and imported the original Docker v2.2, which this text is from, a few days ago. So, there is language that will change and improve before the initial v0.1.0 release.