"docker image history" shows <missing> on image name

IMAGE CREATED CREATED BY SIZE COMMENT

2 weeks ago /bin/sh -c #(nop) LABEL name=CentOS Base … 0 B
2 weeks ago /bin/sh -c #(nop) ADD file:d22a9c627d1d1f3… 193 MB

IMAGE CREATED CREATED BY SIZE COMMENT
0a9ff759e25d 12 minutes ago /bin/sh -c yum install -y wget 20.2 MB
212109caec69 12 minutes ago /bin/sh -c yum install -y vim 75.1 MB
66861e010381 About an hour ago /bin/sh -c yum update -y 126 MB
3bee3060bfc8 2 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0 B
missing 2 weeks ago /bin/sh -c #(nop) LABEL name=CentOS Base … 0 B
missing 2 weeks ago /bin/sh -c #(nop) ADD file:d22a9c627d1d1f3… 193 MB

what are “missing” here , is this normal ? what does missing mean ?

Nigel Brown wrote a pretty clear blog post about Docker images construction.
Regarding the missing layer status, here is what he explains:

When a locally built image is pushed to a registry, it is only the leaf image that is uploaded along with its constituent layers, and a subsequent pull by another Docker host will not yield any intermediate parent images. This is because once the image is made available to other potential users on different Docker hosts via a registry, it effectively becomes read-only, and the components that support the build cache are no longer required. Instead of the image ID, <missing> is inserted into the history output in its place.

1 Like