{"id":881,"date":"2021-05-18T20:46:11","date_gmt":"2021-05-18T12:46:11","guid":{"rendered":"https:\/\/www.myway5.com\/?p=881"},"modified":"2023-07-05T22:05:39","modified_gmt":"2023-07-05T14:05:39","slug":"container-image","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/","title":{"rendered":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684"},"content":{"rendered":"<h2>\u4e00\u3001\u6982\u8ff0<\/h2>\n<p>\u5bb9\u5668\u6280\u672f\u8fd1\u4e9b\u5e74\u7684\u53d1\u5c55\u975e\u5e38\u8fc5\u901f\uff0c\u5176\u672c\u8eab\u4f7f\u7528\u7684\u6280\u672f\u5e76\u975e\u591a\u4e48\u9ad8\u6df1\uff0c\u4f46\u662f\u5e26\u6765\u7684\u751f\u4ea7\u529b\u63d0\u5347\u662f\u4e1a\u754c\u516c\u8ba4\u7684\u3002\u5bb9\u5668\u6280\u672f\u7684\u4e3b\u8981\u7279\u70b9\u5c31\u662f\u5176\u8d44\u6e90\u9650\u5236\u548c\u73af\u5883\u9694\u79bb\uff0clinux \u5bb9\u5668\u4e3b\u8981\u4f7f\u7528 cgroup \u548c namespace \u6280\u672f\uff0c\u4f46\u5982\u679c\u8981\u66f4\u6df1\u5165\u7684\u7406\u89e3\u5bb9\u5668\u6280\u672f\uff0c\u8fd8\u9700\u8981\u4e86\u89e3\u4e00\u4e0b\u5bb9\u5668\u955c\u50cf\u662f\u4ec0\u4e48\u3002<\/p>\n<h2>\u4e8c\u3001\u521d\u63a2<\/h2>\n<p>docker \u53ef\u4ee5\u8bf4\u662f\u5bb9\u5668\u6280\u672f\u7684\u4ee3\u8868\u4e86\uff0c\u4e0b\u9762\u4f1a\u4ee5 docker \u4e3a\u4f8b\u3002docker \u652f\u6301 pull, build, push \u955c\u50cf\u3002<\/p>\n<p>Pull \u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">\u279c  docker pull ubuntu:20.04\n20.04: Pulling from library\/ubuntu\n345e3491a907: Pull complete   # \u955c\u50cf\u5171\u6709\u4e09\u5c42\n57671312ef6f: Pull complete\n5e9250ddb7d0: Pull complete\nDigest: sha256:cf31af331f38d1d7158470e095b132acd126a7180a54f263d386da88eb681d93 # \u955c\u50cf\u7684\u6458\u8981\nStatus: Downloaded newer image for ubuntu:20.04\ndocker.io\/library\/ubuntu:20.04 # \u955c\u50cf\u5730\u5740\n<\/code><\/pre>\n<p>Build \u955c\u50cf\u65f6\uff0c\u9700\u8981\u63d0\u4f9b Dockerfile\uff0cDockerfile \u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">FROM ubuntu:20.04\nRUN touch hello\nCMD ['sh', '-c', 'echo hello ubuntu']\n<\/code><\/pre>\n<p>\u7136\u540e\u5f00\u59cb\u6784\u5efa\u6211\u4eec\u81ea\u5df1\u7684\u955c\u50cf<\/p>\n<pre><code class=\"language-bash line-numbers\">\u279c  docker build -t joyme\/ubuntu-hello:0.1 .\nSending build context to Docker daemon  2.048kB\nStep 1\/3 : FROM ubuntu:20.04\n ---&gt; 7e0aa2d69a15\nStep 2\/3 : RUN touch hello\n ---&gt; Running in 5e2fcef8c28b\nRemoving intermediate container 5e2fcef8c28b\n ---&gt; 4bacc0d61995\nStep 3\/3 : CMD ['sh', '-c', 'echo hello ubuntu']\n ---&gt; Running in 802e795e28c4\nRemoving intermediate container 802e795e28c4\n ---&gt; ff588b7779d8\nSuccessfully built ff588b7779d8\nSuccessfully tagged joyme\/ubuntu-hello:0.1\n<\/code><\/pre>\n<p>push \u6211\u4eec\u81ea\u5df1\u7684\u955c\u50cf\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">\u279c  docker push joyme\/ubuntu-hello:0.1\nThe push refers to repository [docker.io\/joyme\/ubuntu-hello]\n59c67359ad17: Pushed\n2f140462f3bc: Mounted from library\/ubuntu # \u4e0b\u9762\u4e09\u5c42\u90fd\u662f\u6765\u81ea\u4e8e ubuntu:20.04\n63c99163f472: Mounted from library\/ubuntu\nccdbb80308cc: Mounted from library\/ubuntu\n0.1: digest: sha256:0a1a5857cade488bfc60c7f5d2be2c7c5eee7f90edc1950c4c32214fada31a7d size: 1149\n<\/code><\/pre>\n<p>\u6211\u4eec\u4e5f\u53ef\u4ee5\u628a\u955c\u50cf\u4fdd\u5b58\u6210 tar \u5305\uff0c\u7136\u540e\u52a0\u8f7d\u3002\u6bd4\u5982\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">\u279c  docker save -o ubuntu-hello.tar joyme\/ubuntu-hello:0.1\n\u279c  ls\nDockerfile  ubuntu-hello.tar\n\u279c  tar xvf ubuntu-hello.tar\n1392a7609ae8d845eba5fbe95e266a6b104d55b30262a284c960583f91307420\/\n1392a7609ae8d845eba5fbe95e266a6b104d55b30262a284c960583f91307420\/VERSION\n1392a7609ae8d845eba5fbe95e266a6b104d55b30262a284c960583f91307420\/json\n1392a7609ae8d845eba5fbe95e266a6b104d55b30262a284c960583f91307420\/layer.tar\n15cbe1c29902a1020a4a47c835a82f0416f1896f02fac942fdd35d326c63fa22\/\n15cbe1c29902a1020a4a47c835a82f0416f1896f02fac942fdd35d326c63fa22\/VERSION\n15cbe1c29902a1020a4a47c835a82f0416f1896f02fac942fdd35d326c63fa22\/json\n15cbe1c29902a1020a4a47c835a82f0416f1896f02fac942fdd35d326c63fa22\/layer.tar\n2a8749a3d9080a156a4381fea67ce47a478fb31d6acaa20e19fda1ba0c8f20e7\/\n2a8749a3d9080a156a4381fea67ce47a478fb31d6acaa20e19fda1ba0c8f20e7\/VERSION\n2a8749a3d9080a156a4381fea67ce47a478fb31d6acaa20e19fda1ba0c8f20e7\/json\n2a8749a3d9080a156a4381fea67ce47a478fb31d6acaa20e19fda1ba0c8f20e7\/layer.tar\n6d56becb66b184f78b25f61dc91f68fcfce4baeecb3a8dcb21ada2306091aab7\/\n6d56becb66b184f78b25f61dc91f68fcfce4baeecb3a8dcb21ada2306091aab7\/VERSION\n6d56becb66b184f78b25f61dc91f68fcfce4baeecb3a8dcb21ada2306091aab7\/json\n6d56becb66b184f78b25f61dc91f68fcfce4baeecb3a8dcb21ada2306091aab7\/layer.tar\nff588b7779d8b10861c566538b885c379d633d059fc067c5ec6e1ab026427075.json\nmanifest.json\nrepositories\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u53d1\u73b0\uff0c\u955c\u50cf\u662f\u5206\u5c42\u7684\uff0c\u6bd4\u5982\u4e0a\u9762\u7684 ubuntu:20.04 \u955c\u50cf\u603b\u5171\u6709\u4e09\u5c42\uff0c\u6211\u4eec\u57fa\u4e8e ubuntu:20.04 \u5236\u4f5c\u7684 ubuntu-hello:0.1 \u955c\u50cf\u662f 4 \u5c42\uff0c\u5c42\u4fe1\u606f\u8bb0\u5f55\u5728 manifest.json \u6587\u4ef6\u4e2d\u3002<\/p>\n<pre><code class=\"language-bash line-numbers\">\u279c  cat manifest.json | jq\n[\n  {\n    \"Config\": \"ff588b7779d8b10861c566538b885c379d633d059fc067c5ec6e1ab026427075.json\",\n    \"RepoTags\": [\n      \"joyme\/ubuntu-hello:0.1\"\n    ],\n    \"Layers\": [\n      \"15cbe1c29902a1020a4a47c835a82f0416f1896f02fac942fdd35d326c63fa22\/layer.tar\",\n      \"6d56becb66b184f78b25f61dc91f68fcfce4baeecb3a8dcb21ada2306091aab7\/layer.tar\",\n      \"1392a7609ae8d845eba5fbe95e266a6b104d55b30262a284c960583f91307420\/layer.tar\",\n      \"2a8749a3d9080a156a4381fea67ce47a478fb31d6acaa20e19fda1ba0c8f20e7\/layer.tar\"\n    ]\n  }\n]\n<\/code><\/pre>\n<p>2a8749a3 \u662f\u6211\u4eec\u521a\u521a\u521b\u5efa\u7684\u6700\u540e\u4e00\u5c42\uff0c\u4e5f\u5c31\u662f touch hello \u751f\u6210\u7684\u65b0\u6587\u4ef6\u3002\u800c\u6700\u540e\u4e00\u884c CMD \u7531\u4e8e\u5e76\u4e0d\u4f1a\u6539\u53d8\u6587\u4ef6\u4fe1\u606f\uff0c\u56e0\u6b64\u4e0d\u4f1a\u5355\u72ec\u7684\u5b58\u50a8\u6210\u4e00\u5c42\uff0c\u800c\u662f\u8bb0\u5f55\u5728\u548c touch hello \u540c\u4e00\u5c42\u4e2d\u7684 json \u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/p>\n<pre><code class=\"language-bash line-numbers\">    \"Cmd\": [\n      \"\/bin\/sh\",\n      \"-c\",\n      \"#(nop) \",\n      \"CMD [\\\"\/bin\/sh\\\" \\\"-c\\\" \\\"['sh', '-c', 'echo hello ubuntu']\\\"]\"\n    ],\n<\/code><\/pre>\n<h2>\u4e09\u3001\u955c\u50cf\u7684\u672c\u5730\u5b58\u50a8<\/h2>\n<p>\u5f53\u4f7f\u7528 docker pull \u955c\u50cf\u5230\u672c\u5730\u540e\uff0c\u955c\u50cf\u7684\u5b58\u50a8\u4f4d\u7f6e\u4e00\u822c\u90fd\u5728 <code>\/var\/lib\/docker\/image\/&lt;storage_driver&gt;<\/code> \u4e0b\u3002\u56e0\u4e3a\u8981\u8003\u8651\u5230\u955c\u50cf\u5c42\u7684\u590d\u7528\u7b49\u7b49\u573a\u666f\uff0c pull \u4e0b\u6765\u7684\u955c\u50cf\u80af\u5b9a\u4e0d\u4f1a\u662f\u4e00\u4e2a\u538b\u7f29\u5305\u3002\u955c\u50cf\u5b58\u50a8\u65f6\u57fa\u672c\u8981\u6ee1\u8db3\u4ee5\u4e0b\u51e0\u4e2a\u573a\u666f\uff1a<\/p>\n<ul>\n<li>\u5b58\u50a8\u5f53\u671f\u673a\u5668\u4e0a\u6240\u6709\u7684\u955c\u50cf\u7d22\u5f15\u3002<\/li>\n<li>\u5b58\u50a8\u955c\u50cf\u5230\u5c42\u7684\u6620\u5c04\uff0c\u8fd9\u6837\u4f7f\u7528\u955c\u50cf\u65f6\u53ef\u4ee5\u627e\u5230\u5c42\u7684\u4fe1\u606f\u3002<\/li>\n<li>\u6309\u7167\u5c42\u6765\u5b58\u50a8\uff0c\u8fd9\u6837\u5728 pull \u955c\u50cf\u65f6\uff0c\u5982\u679c\u6709\u91cd\u590d\u7684\u5c42\uff0c\u53ef\u4ee5\u907f\u514d\u591a\u6b21\u62c9\u53d6\u3002<\/li>\n<li>\u9700\u8981\u77e5\u9053\u4e00\u4e2a\u5c42\u88ab\u54ea\u4e9b\u955c\u50cf\u5f15\u7528\u3002\u8fd9\u6837\u5728\u5220\u9664\u955c\u50cf\u65f6\uff0c\u53ef\u4ee5\u786e\u5b9a\u8fd9\u4e2a\u955c\u50cf\u7684\u67d0\u4e2a\u5c42\u80fd\u4e0d\u80fd\u88ab\u5220\u9664\u3002<\/li>\n<\/ul>\n<p>\u955c\u50cf\u5b58\u50a8\u7684\u76ee\u5f55\u5206\u5e03\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">\u251c\u2500\u2500 distribution\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 diffid-by-digest\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 v2metadata-by-diffid\n\u251c\u2500\u2500 imagedb\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 content\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 metadata\n\u251c\u2500\u2500 layerdb\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 mounts\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 sha256\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 tmp\n\u2514\u2500\u2500 repositories.json\n<\/code><\/pre>\n<ul>\n<li>repositories.json: \u5b58\u4e86\u7684\u955c\u50cf\u7684 repo \u4fe1\u606f\u4ee5\u53ca\u955c\u50cf\u4fe1\u606f\u3002<\/li>\n<li>distribution \u4e0b\u5b58\u50a8\u4e86\u548c\u955c\u50cf\u5206\u53d1\u76f8\u5173\u7684\u4fe1\u606f\u3002\n<ul>\n<li>diffid-by-digest\uff1a\u5b58\u50a8\u4e86 digest \u5230 diffid \u7684\u6620\u5c04\uff0cdigest \u7528\u6765\u5728\u62c9\u53d6\u5c42\u7684\u65f6\u5019\uff0c\u5bf9\u6bd4\u8fdc\u7aef\u7684\u5c42\u672c\u5730\u662f\u5426\u6709<\/li>\n<li>v2metadata-by-diffid \u5b58\u50a8\u4e86 diffid \u5230\u5c42\u7684\u5143\u6570\u636e\u4fe1\u606f\u3002\u5143\u6570\u636e\u4e2d\u8bb0\u5f55\u4e86\u5c42\u7684 digest\uff0crepo \u7b49<\/li>\n<\/ul>\n<\/li>\n<li>imagedb \u4e0b\u5b58\u50a8\u4e86\u548c\u955c\u50cf\u76f8\u5173\u7684\u4fe1\u606f\u3002\n<ul>\n<li>content \u4e0b\u5b58\u50a8\u7684\u662f\u955c\u50cf\u7684\u914d\u7f6e\u4fe1\u606f\u3002\u4e5f\u662f\u7b26\u5408 OCI \u7684\u89c4\u8303\u7684\u3002\u53ef\u4ee5\u53c2\u8003\uff1ahttps:\/\/github.com\/opencontainers\/image-spec\/blob\/master\/config.md<\/li>\n<li>metadata \u5b58\u50a8\u4e86\u955c\u50cf\u4e4b\u95f4\u7684 parent \u4fe1\u606f\u3002<\/li>\n<\/ul>\n<\/li>\n<li>layerdb \u4e0b\u5b58\u50a8\u4e86\u548c\u955c\u50cf\u5c42\u76f8\u5173\u7684\u4fe1\u606f\n<ul>\n<li>mounts: \u5b58\u50a8\u4e86\u5c42\u7684\u7684\u6302\u8f7d\u4fe1\u606f\uff0c\u5305\u62ec init-id, mount-id, parent<\/li>\n<li>sha256: \u5b58\u50a8\u4e86\u5c42\u7684\u4fe1\u606f\uff0c\u6839\u636e\u5c42\u7684 sha256 \u5212\u5206\u76ee\u5f55<\/li>\n<li>tmp:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u73b0\u5728\u53ef\u4ee5\u77e5\u9053\uff0c\u955c\u50cf\u7684 repo, name, tag, id \u7b49\u4fe1\u606f\uff0c\u53ef\u4ee5\u901a\u8fc7 repositories.json \u77e5\u9053\uff0c\u4f7f\u7528\u7684\u955c\u50cf\u7684\u65f6\u5019\uff0c\u63d0\u4f9b image+tag \u627e\u5230 id\uff0c\u6216\u8005\u76f4\u63a5\u63d0\u4f9b id \u4e5f\u53ef\u4ee5\u3002\u6bd4\u5982\u4e0a\u9762\u7684 ubuntu-hello \u7684 id \u4e3a <code>ff588b7779d8...<\/code>\uff0c\u7136\u540e\u901a\u8fc7\u8fd9\u4e2a id\uff0c\u5728 <code>\/var\/lib\/docker\/image\/overlay2\/imagedb\/content\/sha256<\/code>\u4e0b\u5c31\u53ef\u4ee5\u627e\u5230\u540d\u4e3a\u8fd9\u4e2a id \u7684\u6587\u4ef6\u4e86\uff0c\u91cc\u9762\u5b58\u50a8\u4e86\u955c\u50cf\u7684\u5177\u4f53\u4fe1\u606f\u3002\u8fd9\u4e2a id \u5c31\u662f\u8fd9\u4e2a\u6587\u4ef6\u7684 sha256sum \u540e\u7684\u503c\u3002\u6bd4\u5982 <code>ubuntu-hello<\/code>\u7684 content \u5c31\u5b58\u50a8\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff08\u6709\u4e00\u5b9a\u7684\u7cbe\u7b80\uff09\uff1a<\/p>\n<pre><code class=\"language-json line-numbers\">{\n  \"architecture\": \"amd64\",\n  \"config\": {\n    \"Env\": [\n      \"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\"\n    ],\n    \"Cmd\": [\n      \"\/bin\/sh\",\n      \"-c\",\n      \"['sh', '-c', 'echo hello ubuntu']\"\n    ],\n    \"Image\": \"sha256:4bacc0d6199516a20039bc06ddaa7247a7553a39ae700ade279bd6ce78cd0a61\"\n  },\n  \"container\": \"802e795e28c4afced8fb6e6e703f0efeeaa6fa07a36c4400e242c4cd65e4bff5\",\n  \"history\": [\n    {\n      \"created\": \"2021-05-15T10:32:23.665502338Z\",\n      \"created_by\": \"\/bin\/sh -c touch hello\"\n    },\n    {\n      \"created\": \"2021-05-15T10:32:23.925742465Z\",\n      \"created_by\": \"\/bin\/sh -c #(nop)  CMD [\\\"\/bin\/sh\\\" \\\"-c\\\" \\\"['sh', '-c', 'echo hello ubuntu']\\\"]\",\n      \"empty_layer\": true\n    }\n  ],\n  \"os\": \"linux\",\n  \"rootfs\": {\n    \"type\": \"layers\",\n    \"diff_ids\": [\n      \"sha256:ccdbb80308cc5ef43b605ac28fac29c6a597f89f5a169bbedbb8dec29c987439\",\n      \"sha256:63c99163f47292f80f9d24c5b475751dbad6dc795596e935c5c7f1c73dc08107\",\n      \"sha256:2f140462f3bcf8cf3752461e27dfd4b3531f266fa10cda716166bd3a78a19103\",\n      \"sha256:59c67359ad1702b424dcf3deefdf137e92ef13c13bec5b878b08fe66683a78f7\"\n    ]\n  }\n}\n<\/code><\/pre>\n<p>\u6211\u4eec\u73b0\u5728\u91cd\u70b9\u5173\u6ce8 <code>rootfs<\/code> \u5b57\u6bb5\u4e0b\u7684 diff_ids\uff0c\u8fd9\u91cc\u5b58\u50a8\u4e86\u8be5\u955c\u50cf\u7684\u6bcf\u4e00\u5c42\u7684 diff_id\u3002\u63a5\u4e0b\u6765\u5c31\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e9b id \u627e\u5230\u8fd9\u4e9b\u5c42\u7684\u4fe1\u606f\u4e86\u3002<\/p>\n<p>\u5c42\u7684\u4fe1\u606f\u5b58\u50a8\u5728 <code>\/var\/lib\/docker\/image\/overlay2\/layerdb\/sha256<\/code> \u4e0b\uff0c\u76ee\u5f55\u540d\u662f\u8fd9\u4e00\u5c42\u7684 chain_id\u3002<\/p>\n<blockquote><p>\n  chain_id \u7684\u8ba1\u7b97\u4e2d\uff0c\u7528\u5230\u4e86\u6240\u6709\u7956\u5148 layer \u7684\u4fe1\u606f\uff0c\u4ece\u800c\u80fd\u4fdd\u8bc1\u6839\u636e chain_id \u5f97\u5230\u7684 rootfs \u662f\u552f\u4e00\u7684\u3002\u6bd4\u5982\u6211\u5728debian\u548cubuntu\u7684image\u57fa\u7840\u4e0a\u90fd\u6dfb\u52a0\u4e86\u4e00\u4e2a\u540c\u6837\u7684\u6587\u4ef6\uff0c\u90a3\u4e48commit\u4e4b\u540e\u65b0\u589e\u52a0\u7684\u8fd9\u4e24\u4e2alayer\u5177\u6709\u76f8\u540c\u7684\u5185\u5bb9\uff0c\u76f8\u540c\u7684diff_id\uff0c\u4f46\u7531\u4e8e\u4ed6\u4eec\u7684\u7236layer\u4e0d\u4e00\u6837\uff0c\u6240\u4ee5\u4ed6\u4eec\u7684chain_id\u4f1a\u4e0d\u4e00\u6837\uff0c\u4ece\u800c\u6839\u636echainid\u80fd\u627e\u5230\u552f\u4e00\u7684rootfs\u3002<\/p>\n<p>  chain_id \u7684\u8ba1\u7b97\u65b9\u5f0f\u5982\u4e0b:<\/p>\n<pre><code class=\"line-numbers\">ChainID(L\u2080) =  DiffID(L\u2080)\nChainID(L\u2080|...|L\u2099\u208b\u2081|L\u2099) = Digest(ChainID(L\u2080|...|L\u2099\u208b\u2081) + \" \" + DiffID(L\u2099))\n<\/code><\/pre>\n<p>  \u6bd4\u5982\uff1a\u7b2c\u4e00\u5c42\u7684 diff_id \u662f ccdbb80308cc5ef43b605ac28fac29c6a597f89f5a169bbedbb8dec29c987439\uff0c\u7b2c\u4e00\u5c42\u7684 chain_id \u662f ccdbb80308cc5ef43b605ac28fac29c6a597f89f5a169bbedbb8dec29c987439\uff0c\u7b2c\u4e8c\u5c42\u7684 diff_id \u662f 63c99163f47292f80f9d24c5b475751dbad6dc795596e935c5c7f1c73dc08107\uff0c\u90a3\u4e48\u7b2c\u4e8c\u5c42\u7684 chain_id \u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u65b9\u6cd5\u8ba1\u7b97\uff1a<\/p>\n<p>  echo -n &#8220;sha256:ccdbb80308cc5ef43b605ac28fac29c6a597f89f5a169bbedbb8dec29c987439 sha256:63c99163f47292f80f9d24c5b475751dbad6dc795596e935c5c7f1c73dc08107&#8221; | sha256sum<\/p>\n<p>  \u4e5f\u5c31\u662f\uff1a8d8dceacec7085abcab1f93ac1128765bc6cf0caac334c821e01546bd96eb741\n<\/p><\/blockquote>\n<p><code>8d8dceacec7085abcab1f93ac1128765bc6cf0caac334c821e01546bd96eb741<\/code>\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">cache-id  diff  parent  size  tar-split.json.gz\n<\/code><\/pre>\n<ul>\n<li>cache-id \u662f\u8be5\u5c42\u5b58\u50a8\u76ee\u5f55\u7684\u540d\u5b57\u3002\u6bd4\u5982\u8be5 cache-id \u7684\u5185\u5bb9\u4e3a <code>52cb2ec8a0ac5a2418c568896fc079cc29a0da7d7b6b0c4b740d13241581d6e8<\/code>\uff0c\u5bf9\u5e94\u7684\u4f4d\u7f6e\u662f <code>\/var\/lib\/docker\/overlay2\/52cb2ec8a0ac5a2418c568896fc079cc29a0da7d7b6b0c4b740d13241581d6e8<\/code>\uff0c\u8fd9\u91cc\u624d\u662f\u8fd9\u4e00\u5c42\u6587\u4ef6\u7684\u5b9e\u9645\u4f4d\u7f6e\u3002cache-id \u662f\u968f\u673a\u751f\u6210\u7684\u3002<\/li>\n<li>diff: \u5b58\u50a8\u7684\u662f diff_id\uff0c\u8fd9\u91cc\u5c31\u662f <code>ccdbb80308cc5ef43b605ac28fac29c6a597f89f5a169bbedbb8dec29c987439<\/code>\u3002diff_id \u662f layer.tar \u7684 sha256sum \u7684\u503c\u3002<\/li>\n<li>parent: \u8bb0\u5f55\u4e86\u4e0a\u4e00\u5c42\u7684 chain_id\u3002<\/li>\n<li>size: \u8fd9\u4e00\u5c42\u7684\u5927\u5c0f\u3002<\/li>\n<li>tar-split.json.gz\uff1a<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/vbatts\/tar-split\">vbatts\/tar-split<\/a> \u8fd9\u4e2a\u5e93\u751f\u6210\u7684\u6587\u4ef6\uff0c\u4e3b\u8981\u4e3a\u4e86 image pull \u4e4b\u540e\uff0c\u91cd\u65b0\u63a8\u9001\u53ef\u80fd\u51fa\u73b0\u7684 layer checksum \u4e0d\u4e00\u81f4\u7684\u95ee\u9898\u3002\u5177\u4f53\u53ef\u89c1:\n<ul>\n<li>https:\/\/github.com\/moby\/moby\/pull\/14067<\/li>\n<li>https:\/\/github.com\/moby\/moby\/issues\/14018<\/li>\n<li>https:\/\/github.com\/distribution\/distribution\/issues\/634<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u56db\u3001\u955c\u50cf\u7684\u4f7f\u7528<\/h2>\n<p>\u6839\u636e\u4e0a\u9762\u7684\u63a2\u7d22\u53ef\u4ee5\u77e5\u9053\uff0c\u63d0\u4f9b image+tag \u6216\u8005 image_id\uff0c\u5c31\u53ef\u4ee5\u627e\u5230\u5173\u4e8e\u8fd9\u4e2a\u955c\u50cf\u7684\u6240\u6709\u4fe1\u606f\u3002\u90a3\u4e48\u955c\u50cf\u63d0\u4f9b\u7684\u8fd9\u4e9b\u6587\u4ef6\u662f\u5982\u4f55\u88ab\u4f7f\u7528\u7684\u5462\uff1f\u6700\u7b80\u5355\u7684\u505a\u6cd5\u5c31\u662f\uff0c\u5c06\u6240\u6709\u5c42\u7684\u4fe1\u606f\u5408\u5e76\u6210 rootfs\uff0c\u63d0\u4f9b\u7ed9 runc \u4f7f\u7528\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u90a3\u4e48\u5982\u4f55\u628a\u8fd9\u4e9b\u5c42\u7684\u4fe1\u606f\u9ad8\u6548\u7684\u7ec4\u5408\u6210 rootfs \uff1f\u7b54\u6848\u5c31\u662f\u8054\u5408\u6587\u4ef6\u7cfb\u7edf\uff08UnionFS\uff09\u3002\u8054\u5408\u6587\u4ef6\u7cfb\u7edf\u662f\u4e00\u79cd\u5206\u5c42\u3001\u8f7b\u91cf\u7ea7\u5e76\u4e14\u9ad8\u6027\u80fd\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5b83\u652f\u6301\u5bf9\u6587\u4ef6\u7cfb\u7edf\u7684\u4fee\u6539\u4f5c\u4e3a\u4e00\u6b21\u63d0\u4ea4\u6765\u4e00\u5c42\u5c42\u7684\u53e0\u52a0\uff0c\u540c\u65f6\u53ef\u4ee5\u5c06\u4e0d\u540c\u76ee\u5f55\u6302\u8f7d\u5230\u540c\u4e00\u4e2a\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u4e0b\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u8fd8\u662f\u62ff docker \u6765\u8bf4\uff0cdocker \u76ee\u524d\u652f\u6301\u7684\u8054\u5408\u6587\u4ef6\u7cfb\u7edf\u6709\uff1aoverlay2\uff0caufs\uff0cfuse-overlayfs\uff0cdevicemapper\uff0cbtrfs\uff0czfs\uff0cvfs\u3002\u76ee\u524d\u63a8\u8350\u7684\u662f overlay2 \uff0c\u4e0b\u9762\u4f1a\u4f7f\u7528 overlay2 \u6765\u8bb2\u89e3\u5bb9\u5668\u662f\u5982\u4f55\u4f7f\u7528\u955c\u50cf\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\" alt=\"overlayfs\" \/><\/p>\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0coverlay2 \u4e3b\u8981\u6709\u4e09\u4e2a\u76ee\u5f55<\/p>\n<ul>\n<li>lowerdir \u5bf9\u5e94\u4e86 image layers\uff0c\u56fe\u4e0a\u53ea\u82b1\u4e86\u4e00\u5c42\uff0c\u4f46\u5b9e\u9645\u4e0a\u662f\u652f\u6301\u591a\u5c42\u7684\uff0clowerdir \u662f\u53ea\u8bfb\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4 image layers \u4e2d\u6240\u6709\u7684\u6587\u4ef6\u90fd\u4e0d\u4f1a\u88ab\u4fee\u6539\u3002<\/li>\n<li>upperdir \u5bf9\u5e94\u4e86 container layer\uff0c\u8fd9\u4e2a\u662f\u6211\u4eec\u8fd0\u884c\u5bb9\u5668\u65f6\u521b\u5efa\u51fa\u6765\u7684\u3002upperdir \u662f\u652f\u6301\u8bfb\u5199\u7684<\/li>\n<li>merged \u5bf9\u5e94\u4e86 container mount\uff0c\u8fd9\u4e00\u5c42\u662f\u5bb9\u5668\u5185\u7684\u6587\u4ef6\u7cfb\u7edf\u89c6\u56fe\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f1a\u628a image layer \u548c container layer \u5728\u903b\u8f91\u4e0a\u5408\u5e76\u8d77\u6765\u3002<\/li>\n<\/ul>\n<p>overlay2 \u5176\u5b9e\u8fd8\u6709\u4e00\u4e2a\u76ee\u5f55 workdir\uff0cworkdir \u662f\u4e3a\u4e86\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\uff0c\u4e3a\u4e86\u4fdd\u8bc1\u64cd\u4f5c\u7684\u539f\u5b50\u6027\u800c\u8bbe\u8ba1\u7684\u3002\u5177\u4f53\u7684\u53ef\u4ee5\u53c2\u8003\uff1a<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.csdn.net\/luckyapple1028\/article\/details\/78075358\">\u6df1\u5165\u7406\u89e3overlayfs\uff08\u4e8c\uff09\uff1a\u4f7f\u7528\u4e0e\u539f\u7406\u5206\u6790<\/a><\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4e3e\u51e0\u4e2a\u4f8b\u5b50\u5e2e\u52a9\u7406\u89e3\u3002\u6211\u4eec\u901a\u8fc7 image \u8fd0\u884c\u5bb9\u5668\u540e\uff0c\u6b64\u65f6 image layer \u5982\u4e0a\u56fe\u6240\u793a\uff0c\u4f46 container layer \u662f\u7a7a\u7684\u3002<\/p>\n<ul>\n<li>\u5728\u5bb9\u5668\u5185\u5220\u9664 file2\uff0c\u53ea\u4f1a\u5728 container layer \u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a file2 \u7684 whiteout \u6587\u4ef6\uff0cimage layer \u7684 file2 \u4e0d\u4f1a\u88ab\u771f\u6b63\u7684\u5220\u9664\u3002\u5bb9\u5668\u5185 file2 \u4e0d\u53ef\u89c1\u3002<\/li>\n<li>\u5728\u5bb9\u5668\u5185\u91cd\u65b0\u521b\u5efa file2\uff0c\u53ea\u4f1a\u5728 container layer \u521b\u5efa file2\u3002<\/li>\n<li>\u5728\u5bb9\u5668\u5185\u4fee\u6539 file1\uff0c\u4f1a\u89e6\u53d1 copy-up\uff0c\u5c06 image layer \u7684 file1 \u62f7\u8d1d\u5230 container layer \u4e2d\u5e76\u4fee\u6539\u3002<\/li>\n<\/ul>\n<p>\u53ef\u89c1\uff0c\u5728 container layer \u7684\u6587\u4ef6\u64cd\u4f5c\u6bd4\u666e\u901a\u7684\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\u6d88\u8017\u66f4\u5927\uff0c\u7279\u522b\u662f\u4fee\u6539 image layer \u7684\u5927\u6587\u4ef6\u4f1a\u89e6\u53d1\u590d\u5236\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 docker inspect <container_id> \u6765\u770b\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-json line-numbers\">\"GraphDriver\": {\n  \"Data\": {\n    \"LowerDir\": \"\/data00\/docker\/overlay2\/379f2fd25bc3e317b5f767ea1bf061174013c0aa80a9454c6f01d47722dbd270-init\/diff:\/data00\/docker\/overlay2\/a80f1234038ffa4720876215a77c16fd42d67fd0f110d9bd984dca73ea03b49b\/diff:\/data00\/docker\/overlay2\/2aac2c4faa0be785d9d0faa5127f635bbc4dc65eb635bc442da4e03b46f05814\/diff:\/data00\/docker\/overlay2\/afd88f520ed7fde849d8b7b136261348cd165bed4a6796382188529e08426685\/diff:\/data00\/docker\/overlay2\/081774340b851380f09ad2d0286d8cfad388bf6738673ee089ed06efbed295c0\/diff:\/data00\/docker\/overlay2\/651cf1972f63c01679beac3705e1d984d7dcae01ed4e6ae6c76bd7326b97d1c0\/diff:\/data00\/docker\/overlay2\/2fc2f5bf53a5aaaec137666c6988573b3c3887a63eb5594ccbcd07995d0d3e5f\/diff:\/data00\/docker\/overlay2\/0d323f1368ced5d62a56e7dd447db7cc4032b598a23473d31d5e812d2fed2376\/diff:\/data00\/docker\/overlay2\/d07016559096eb4a59d4fe1e97ed7b26a492156f764542ff15ccbf53624ff7d2\/diff:\/data00\/docker\/overlay2\/db070da7fe3eb36cd5a70fbcd5d72fed192d2d25d27cd5d9f7cfa26fb9de7bd0\/diff:\/data00\/docker\/overlay2\/cabe60077f68da04a6d460cac3ef339bde6919fc267d808fd52950bbc5f4891d\/diff:\/data00\/docker\/overlay2\/f1368e926209187e11312e4b805c9b1d912ac64776eada90e5115b245f5ab54a\/diff\",\n    \"MergedDir\": \"\/data00\/docker\/overlay2\/379f2fd25bc3e317b5f767ea1bf061174013c0aa80a9454c6f01d47722dbd270\/merged\",\n    \"UpperDir\": \"\/data00\/docker\/overlay2\/379f2fd25bc3e317b5f767ea1bf061174013c0aa80a9454c6f01d47722dbd270\/diff\",\n    \"WorkDir\": \"\/data00\/docker\/overlay2\/379f2fd25bc3e317b5f767ea1bf061174013c0aa80a9454c6f01d47722dbd270\/work\"\n  },\n  \"Name\": \"overlay2\"\n}\n<\/code><\/pre>\n<p>\u4e86\u89e3\u4e86\u4e0a\u8ff0\u7684\u77e5\u8bc6\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5bf9 docker commit \u7684\u673a\u5236\u505a\u4e00\u4e9b\u731c\u60f3\u4e86\uff1a\u5e94\u8be5\u5c31\u662f\u5c06 upperdir \u4f5c\u4e3a\u65b0\u7684 lowerdir \u8fdb\u884c\u6302\u8f7d\u3002<\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.csdn.net\/luckyapple1028\/article\/details\/78075358\">\u6df1\u5165\u7406\u89e3overlayfs\uff08\u4e8c\uff09\uff1a\u4f7f\u7528\u4e0e\u539f\u7406\u5206\u6790<\/a><\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/github.com\/opencontainers\/distribution-spec\/blob\/main\/spec.md#appendix\">Open Container Initiative Distribution Specification<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u6982\u8ff0 \u5bb9\u5668\u6280\u672f\u8fd1\u4e9b\u5e74\u7684\u53d1\u5c55\u975e\u5e38\u8fc5\u901f\uff0c\u5176\u672c\u8eab\u4f7f\u7528\u7684\u6280\u672f\u5e76\u975e\u591a\u4e48\u9ad8\u6df1\uff0c\u4f46\u662f\u5e26\u6765\u7684\u751f\u4ea7\u529b\u63d0\u5347\u662f\u4e1a\u754c\u516c\u8ba4\u7684\u3002\u5bb9\u5668\u6280 &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97],"tags":[],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-container"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u6982\u8ff0 \u5bb9\u5668\u6280\u672f\u8fd1\u4e9b\u5e74\u7684\u53d1\u5c55\u975e\u5e38\u8fc5\u901f\uff0c\u5176\u672c\u8eab\u4f7f\u7528\u7684\u6280\u672f\u5e76\u975e\u591a\u4e48\u9ad8\u6df1\uff0c\u4f46\u662f\u5e26\u6765\u7684\u751f\u4ea7\u529b\u63d0\u5347\u662f\u4e1a\u754c\u516c\u8ba4\u7684\u3002\u5bb9\u5668\u6280 &hellip; \u7ee7\u7eed\u9605\u8bfb\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-18T12:46:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T14:05:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684\",\"datePublished\":\"2021-05-18T12:46:11+00:00\",\"dateModified\":\"2023-07-05T14:05:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\"},\"wordCount\":335,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\",\"articleSection\":[\"\u5bb9\u5668\u6280\u672f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\",\"name\":\"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\",\"datePublished\":\"2021-05-18T12:46:11+00:00\",\"dateModified\":\"2023-07-05T14:05:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage\",\"url\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\",\"contentUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg\",\"width\":754,\"height\":193},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u4e00\u3001\u6982\u8ff0 \u5bb9\u5668\u6280\u672f\u8fd1\u4e9b\u5e74\u7684\u53d1\u5c55\u975e\u5e38\u8fc5\u901f\uff0c\u5176\u672c\u8eab\u4f7f\u7528\u7684\u6280\u672f\u5e76\u975e\u591a\u4e48\u9ad8\u6df1\uff0c\u4f46\u662f\u5e26\u6765\u7684\u751f\u4ea7\u529b\u63d0\u5347\u662f\u4e1a\u754c\u516c\u8ba4\u7684\u3002\u5bb9\u5668\u6280 &hellip; \u7ee7\u7eed\u9605\u8bfb\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684","og_url":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2021-05-18T12:46:11+00:00","article_modified_time":"2023-07-05T14:05:39+00:00","og_image":[{"url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg","type":"","width":"","height":""}],"author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684","datePublished":"2021-05-18T12:46:11+00:00","dateModified":"2023-07-05T14:05:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/"},"wordCount":335,"commentCount":1,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg","articleSection":["\u5bb9\u5668\u6280\u672f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/","url":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/","name":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg","datePublished":"2021-05-18T12:46:11+00:00","dateModified":"2023-07-05T14:05:39+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#primaryimage","url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg","contentUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2021\/05\/overlay_constructs.jpg","width":754,"height":193},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2021\/05\/18\/container-image\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"\u5bb9\u5668\u955c\u50cf\u662f\u5982\u4f55\u5de5\u4f5c\u7684"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":7657,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=881"}],"version-history":[{"count":2,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":883,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/881\/revisions\/883"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}