Why are docker-level identifiers now hidden with the new storage model?

Docker 1.10 introduced a new content storage model . So now the layer ID is created as a hash from its contents. Thus, layers with the same content must be reused.

This sounds good, but why is this identifier hidden from us now? I did some simple tests to find out if layers are really reused. For example, I tried to execute some automatic assemblies from the same source, but with different tags.

In the end, I still get different image identifiers. And if I look docker history, I get <missing>for image identifiers:

IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
7b007b10103a        15 minutes ago      /bin/sh -c #(nop) COPY file:4c2cb4c2780edc6e2   37.77 kB            
<missing>           15 minutes ago      /bin/sh -c #(nop) COPY file:ac11867f64e4fdd4e   856 B               
<missing>           15 minutes ago      /bin/sh -c #(nop) ENV PATH=/usr/local/sbin:/u   0 B                 
<missing>           15 minutes ago      /bin/sh -c #(nop) MAINTAINER haertl.mike@gmai   0 B

Why is this information hidden now? And why do images with the same content still have different image identifiers?

EDIT: There is also a note in the docker documentation. But this does not explain why this decision was made. IMO this takes away a lot of transparency from docker images and complicates their analysis / debugging.

From docs :

. , Docker 1.10, . , . , "" . .

, .

+4

Source: https://habr.com/ru/post/1628873/


All Articles