这篇文章主要为大家展示了“Docker镜像的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Docker镜像的示例分析”这篇文章吧。
一:思维导图
二:镜像的生命周期
三:镜像的组织结构
四:镜像的数据结构
docker inspect busybox:latest
[ { "Id": "sha256:8c811b4aec35f259572d0f79207bc0678df4c736eeec50bc9fec37ed936a472a", "RepoTags": [ "docker.io/busybox:latest" ], "RepoDigests": [ "docker.io/busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47" ], "Parent": "", "Comment": "", "Created": "2018-05-23T21:19:31.132152818Z", "Container": "617bfbb850a66642161d4925e0c00f77caa46e22057409788207e7b2edb86c3e", "ContainerConfig": { "Hostname": "617bfbb850a6", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "/bin/sh", "-c", "#(nop) ", "CMD [\"sh\"]" ], "ArgsEscaped": true, "Image": "sha256:3e8a1c5213eb57c6ea8ddb27d86a241698741ce60d9053b641f57a7e455f6842", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": {} }, "DockerVersion": "17.06.2-ce", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": [ "sh" ], "ArgsEscaped": true, "Image": "sha256:3e8a1c5213eb57c6ea8ddb27d86a241698741ce60d9053b641f57a7e455f6842", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null }, "Architecture": "amd64", "Os": "linux", "Size": 1146369, "VirtualSize": 1146369, "GraphDriver": { "Name": "overlay", "Data": { "RootDir": "/var/lib/docker/overlay/4f7e0d9cff96526ac13d288d22e27be31f9fc8c7e5976aa3640a4ac2d0b2c7fb/root" } }, "RootFS": { "Type": "layers", "Layers": [ "sha256:432b65032b9466b4dadcc5c7b11701e71d21c18400aae946b101ad16be62333a" ] } } ]
a.Id: Image的ID实际上只是最上层的layerID
b.Parent: 该layer的父层,可以递归地获得某个Image的所有layer信息
c.Comment: 非常类似于Git的commit message
d.Container: 容器启动需要以image为模板,但又可以把容器保存为镜像,所以一般来说image的每个layer都保存自一个容器,所以该容器可以说是image layer的“模板”
e.Config 包含了该image的一些配置信息
f.Architecture: 该image对应的CPU体系结构,现在Docker官方支持amd64
以上是“Docker镜像的示例分析”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。