Hi,
Please clarify the following when storage driver is overlay
-
Layers information given by docker image inspect <image name/id>
-
Layers information given in docker history <image name/id>
-
the contents of /var/lib/docker/image/overlay/layerdb/sha256
################################################################################
The following are the reference prints:
[root@eilagcy1 image]# docker info | grep -i storage
WARNING: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
Reformat the filesystem with ftype=1 to enable d_type support.
Running without d_type support will not be supported in future releases.
Storage Driver: overlay
[root@eilagcy1 image]#
From the above print, it is clear that the storage driver is overlay
[root@eilagcy1 image]# docker image pull nginx:latest
latest: Pulling from library/nginx
a5a6f2f73cd8: Pull complete
1ba02017c4b2: Pull complete
33b176c904de: Pull complete
Digest: sha256:5d32f60db294b5deb55d078cd4feb410ad88e6fe77500c87d3970eca97f54dba
Status: Downloaded newer image for nginx:latest
[root@eilagcy1 image]#
From the above, we can see the nginx is comprised of the following 3 layers
a5a6f2f73cd8
1ba02017c4b2
33b176c904de
[root@eilagcy1 sha256]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 568c4670fa80 7 days ago 109MB
[root@eilagcy1 sha256]# docker image inspect 568c4670fa80 | grep -A6 Layers
“Layers”: [
“sha256:ef68f6734aa485edf13a8509fe60e4272428deaf63f446a441b79d47fc5d17d3”,
“sha256:ad5345cbb119f7c720123e3adf28b164143e4157ca6e46a629ca694e75f7825f”,
“sha256:ece4f9fdef598687f23d39643bacbf2c609201b087b93bbae81b931da72d2a64”
]
}
}
Docker inspect on this image i.e 568c4670fa80 shows some different names of layers ???
The /var/lib/docker shows some different layer names???
[root@eilagcy1 sha256]# pwd
/var/lib/docker/image/overlay/layerdb/sha256
[root@eilagcy1 sha256]# ls -l
total 0
drwx------. 2 root root 80 Dec 5 09:23 6b9d35d8d75115937cd78da275f527cccef672cbd71f34062dffe2e930fd7e13
drwx------. 2 root root 80 Dec 5 09:23 ac0442c0fafd48e24a96fa3099ea7ad20012c8759e1dd03dd387dbfbe382984c
drwx------. 2 root root 67 Dec 5 09:23 ef68f6734aa485edf13a8509fe60e4272428deaf63f446a441b79d47fc5d17d3
################################################################################
Regards,
Anuraag