您好,登錄后才能下訂單哦!
這篇文章主要為大家展示了“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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。