{"id":8751,"date":"2024-09-14T10:03:17","date_gmt":"2024-09-14T02:03:17","guid":{"rendered":"http:\/\/999.zuizhuai.cn\/?p=8751"},"modified":"2024-09-14T10:03:17","modified_gmt":"2024-09-14T02:03:17","slug":"%e5%a6%82%e4%bd%95%e7%bb%99%e6%a0%91%e8%8e%93%e6%b4%be%e5%ae%89%e8%a3%85docker%ef%bc%8c%e7%9c%8b%e8%bf%99%e4%b8%80%e7%af%87%e5%b0%b1%e5%a4%9f%e4%ba%86","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=8751","title":{"rendered":"\u5982\u4f55\u7ed9\u6811\u8393\u6d3e\u5b89\u88c5docker\uff0c\u770b\u8fd9\u4e00\u7bc7\u5c31\u591f\u4e86"},"content":{"rendered":"<section style=\"letter-spacing: 0px;line-height: 2em;padding-right: 12px;padding-left: 12px;text-align: left\" data-tool=\"mdx editor\" data-website=\"https:\/\/editor.runjs.cool\/\">\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"5\">Docker\u5b98\u65b9\u63d0\u4f9b\u4e86Raspberry Pi OS 32\u4f4d\uff08armhf\uff09\u7cfb\u7edf\u5b89\u88c5Docker Engine\u7684\u65b9\u5f0f\uff0c\u4f7f\u752864\u4f4d (arm64) \u7cfb\u7edf\u9700\u6309\u7167Debian\u7684\u5b89\u88c5\u65b9\u5f0f\u8fdb\u884c\u5b89\u88c5\uff08<strong data-line=\"5\">Raspberry Pi OS\u662f\u57fa\u4e8eDebian\u5f00\u53d1\u7684\u64cd\u4f5c\u7cfb\u7edf<\/strong>\uff09\u3002\u672c\u6587\u7740\u91cd\u4ecb\u7ecdRaspberry Pi OS (64-bit)\u5b89\u88c5Docker Engine\u3002<\/p>\n<blockquote style=\"border-left: 4px solid var(--weui-BRAND);color: var(--weui-fg-half);padding: 1px 16px;margin-top: 16px;margin-bottom: 16px;border-radius: 5px\" data-line=\"8\">\n<p style=\"margin-top: 16px;margin-bottom: 16px;line-height: 26px;color: var(--weui-fg-half)\" data-line=\"8\">Raspberry Pi OS\uff0832-bit\uff09\u7cfb\u7edfDocker Engine\u5b89\u88c5\u65b9\u5f0f\uff1a<span style=\"color: var(--weui-link);font-weight: 600\" data-href=\"https:\/\/docs.docker.com\/engine\/install\/raspberry-pi-os\/\">https:\/\/docs.docker.com\/engine\/install\/raspberry-pi-os\/<\/span><\/p>\n<\/blockquote>\n<h5 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0)\" data-line=\"10\"><span style=\"font-size: 20px\"><strong>\u64cd\u4f5c\u7cfb\u7edf\u8981\u6c42<\/strong><\/span><\/h5>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px\" data-line=\"12\">\n<li>Debian version:\u00a012 (bookworm)\uff0c<strong data-line=\"11\">\u76ee\u524d\u6700\u65b0\u7a33\u5b9a\u7248\u672c<\/strong><\/li>\n<li>Debian version:\u00a011 (bullseye)\uff0c<strong data-line=\"12\">\u4e0a\u4e00\u4e2a\u7a33\u5b9a\u7248\u672c<\/strong><\/li>\n<\/ul>\n<blockquote style=\"border-left: 4px solid var(--weui-BRAND);color: var(--weui-fg-half);padding: 1px 16px;margin-top: 16px;margin-bottom: 16px;border-radius: 5px\" data-line=\"14\">\n<p style=\"margin-top: 16px;margin-bottom: 16px;line-height: 26px;color: var(--weui-fg-half)\" data-line=\"14\">\u261d\ufe0f\u8fd9\u662f\u7b14\u8005\u5728\u5199\u8fd9\u7bc7\u6587\u7ae0\u65f6\u7684Debian\u7248\u672c\u60c5\u51b5\uff0c\u540e\u7eed\u5f53Debian 13 (Trixie)\u7a33\u5b9a\u7248\u672c\u53d1\u5e03\u540e\uff0cDocker\u4ed3\u5e93\u5c31\u4f1a\u79fb\u9664\u5bf9Debian 11 (bullseye)\u7684\u652f\u6301<\/p>\n<\/blockquote>\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"16\">\u67e5\u770b\u4f60\u7684Raspberry Pi OS\u7cfb\u7edf\u7248\u672c<\/p>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"19\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ cat \/etc\/os-release\n<\/span><\/code><\/pre>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9481\" src=\"http:\/\/loc-wp-cdnimg.jiyun.net\/blogtest\/2024\/09\/20240916012414847.png\" width=\"387\" height=\"181\" alt=\"20240916012414847\" title=\"20240916012414847\" \/><\/p>\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"20\"><span style=\"font-size: 20px\"><strong><span style=\"font-size: 20px;color: var(--weui-fg-0);font-weight: bold;letter-spacing: 0px\">\u5378\u8f7d\u53ef\u80fd\u4f1a\u51b2\u7a81\u7684\u8f6f\u4ef6\u5305<\/span><\/strong><\/span><\/p>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"25\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done\n<\/span><\/code><\/pre>\n<h5 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0)\" data-line=\"27\"><span style=\"font-size: 20px\"><strong><span style=\"font-size: 20px;color: var(--weui-fg-0);letter-spacing: 0px\">\u8bbe\u7f6eDocker\u7684apt\u5b58\u50a8\u5e93<\/span><\/strong><\/span><\/h5>\n<blockquote style=\"border-left: 4px solid var(--weui-BRAND);color: var(--weui-fg-half);padding: 1px 16px;margin-top: 16px;margin-bottom: 16px;border-radius: 5px\" data-line=\"28\">\n<p style=\"margin-top: 16px;margin-bottom: 16px;line-height: 26px;color: var(--weui-fg-half)\" data-line=\"28\">\u7531\u4e8e\u56fd\u5185\u7f51\u7edc\u539f\u56e0\uff0c\u9700\u8981\u628aDocker\u5b98\u65b9\u4ed3\u5e93\u5730\u5740\u66ff\u6362\u4e3a\u963f\u91cc\u4e91\u7684Docker\u4ed3\u5e93\u5730\u5740<\/p>\n<\/blockquote>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"44\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\"># \u6dfb\u52a0\u963f\u91cc\u4e91Docker GPG\u5bc6\u94a5:\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo apt-get update\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo apt-get install ca-certificates curl\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo install -m 0755 -d \/etc\/apt\/keyrings\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo curl -fsSL https:\/\/mirrors.aliyun.com\/docker-ce\/linux\/debian\/gpg -o \/etc\/apt\/keyrings\/docker.asc\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo chmod a+r \/etc\/apt\/keyrings\/docker.asc\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\"># \u6dfb\u52a0Apt\u6e90:\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ echo\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">  \"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.asc] https:\/\/mirrors.aliyun.com\/docker-ce\/linux\/debian\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">  $(. \/etc\/os-release <span style=\"background: none\">&amp;&amp;<\/span> echo \"$VERSION_CODENAME\") stable\" <span style=\"background: none\">|<\/span>\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">  sudo tee \/etc\/apt\/sources.list.d\/docker.list <span style=\"background: none\">&gt;<\/span> \/dev\/null\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo apt-get update\n<\/span><\/code><\/pre>\n<h5 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0)\" data-line=\"46\"><span style=\"font-size: 20px\"><strong>\u5b89\u88c5Docker\u8f6f\u4ef6\u5305<\/strong><\/span><\/h5>\n<h6 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0);font-size: 14px\" data-line=\"48\"><span style=\"font-size: 17px\">\u5b89\u88c5\u6700\u65b0\u7248\u672c\uff1a<\/span><\/h6>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"52\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n<\/span><\/code><\/pre>\n<h6 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0);font-size: 14px\" data-line=\"54\"><span style=\"font-size: 17px\">\u6307\u5b9a\u7248\u672c\u5b89\u88c5\uff1a<\/span><\/h6>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"59\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\"># \u5217\u51fa\u53ef\u7528\u7248\u672c\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ apt-cache madison docker-ce <span style=\"background: none\">|<\/span> awk '{ print $3 }'\n<\/span><\/code><\/pre>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9482\" src=\"http:\/\/loc-wp-cdnimg.jiyun.net\/blogtest\/2024\/09\/20240916012415404.png\" width=\"506\" height=\"181\" alt=\"20240916012415404\" title=\"20240916012415404\" \/><\/p>\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"60\">\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"66\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\"># \u9009\u62e9\u6240\u9700\u7684\u7248\u672c\u5e76\u5b89\u88c5\uff1a\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ VERSION_STRING<span style=\"background: none\">=<\/span>5:27.1.1-1~debian.12~bookworm\n<\/span><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo apt-get install docker-ce<span style=\"background: none\">=<\/span>$VERSION_STRING docker-ce-cli<span style=\"background: none\">=<\/span>$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin\n<\/span><\/code><\/pre>\n<h6 style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;color: var(--weui-fg-0);font-size: 14px\" data-line=\"68\"><span style=\"font-size: 17px\">\u901a\u8fc7\u8fd0\u884chello-world\u955c\u50cf\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f<\/span><\/h6>\n<section style=\"justify-content: space-between;align-items: center;font-size: 12px;height: 30px;line-height: 30px\"><\/section>\n<pre style=\", consolas, monaco, menlo, monospace;overflow: auto;line-height: 1.75\" data-title=\"true\"><code style=\"float: left;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;, monospace;line-height: 1.5;letter-spacing: 0.2px;min-width: 100%;font-size: 12px;flex: 0 0 auto;padding-right: 12px;padding-bottom: 12px;padding-left: 12px;max-width: unset\" data-line=\"72\"><span style=\"padding-left: 16px;padding-right: 16px;margin-left: -16px;margin-right: -16px;border-left-width: 4px;border-left-style: solid\">$ sudo docker run hello-world\n<\/span><\/code><\/pre>\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"74\">\u6b64\u547d\u4ee4\u4e0b\u8f7d\u6d4b\u8bd5\u955c\u50cf\u5e76\u8fd0\u884c\u5bb9\u5668\u3002\u5f53\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u5b83\u4f1a\u6253\u5370\u5982\u4e0b\u4fe1\u606f\u5e76\u9000\u51fa\uff1a<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9483\" src=\"http:\/\/loc-wp-cdnimg.jiyun.net\/blogtest\/2024\/09\/20240916012416377.png\" width=\"634\" height=\"409\" alt=\"20240916012416377\" title=\"20240916012416377\" \/><\/p>\n<p style=\"margin-top: 16px;margin-bottom: 16px\" data-line=\"76\">\n<blockquote style=\"border-left: 4px solid var(--weui-BRAND);color: var(--weui-fg-half);padding: 1px 16px;margin-top: 16px;margin-bottom: 16px;border-radius: 5px\" data-line=\"78\">\n<p style=\"margin-top: 16px;margin-bottom: 16px;line-height: 26px;color: var(--weui-fg-half)\" data-line=\"78\">docker\u670d\u52a1\u5728\u57fa\u4e8eDebian\u7684\u53d1\u884c\u7248\u4e0a\u9ed8\u8ba4\u4f1a\u5f00\u673a\u81ea\u542f<\/p>\n<\/blockquote>\n<\/section>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker\u5b98\u65b9\u63d0\u4f9b\u4e86Raspberry Pi OS 32\u4f4d\uff08armhf\uff09\u7cfb\u7edf\u5b89\u88c5Docker Engine\u7684\u65b9\u5f0f\uff0c\u4f7f\u752864\u4f4d (arm64) \u7cfb\u7edf\u9700\u6309\u7167Debian\u7684\u5b89\u88c5\u65b9\u5f0f\u8fdb\u884c\u5b89\u88c5\uff08Raspberry Pi OS\u662f\u57fa\u4e8eDebian\u5f00\u53d1\u7684&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[141,128],"tags":[159,244],"topic":[],"class_list":["post-8751","post","type-post","status-publish","format-standard","hentry","category-tools-soft","category-128","tag-docker","tag-244"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/8751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8751"}],"version-history":[{"count":0,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/8751\/revisions"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8751"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8751"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=8751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}