{"id":35151,"date":"2023-05-04T04:40:27","date_gmt":"2023-04-25T15:50:58","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/"},"modified":"2024-04-30T02:32:17","modified_gmt":"2024-04-29T18:32:17","slug":"%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/","title":{"rendered":"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4"},"content":{"rendered":"<h2>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u7f51\u7ad9<\/h2>\n<p>\u5173\u4e8eDocker\u7684\u4e8b\u9879<\/p>\n<p>&nbsp;<\/p>\n<p>\u5efa\u6784\u6b65\u9aa4<\/p>\n<p>&nbsp;<\/p>\n<h2>\u4efb\u52a1\u5185\u5bb9<\/h2>\n<h3>\u4f7f\u7528 apt \u5b58\u50a8\u5e93\u5b89\u88c5 Docker<\/h3>\n<p>\u4e3a\u4e86\u5c06Docker\u7684GPG\u5bc6\u94a5\u6ce8\u518c\u5230apt\u4e2d\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u3002<br \/>\n\u8fd9\u6837\u4e00\u6765\uff0c\u60a8\u5c31\u53ef\u4ee5\u901a\u8fc7apt\u9a8c\u8bc1\u5df2\u5b89\u88c5\u7684Docker\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo mkdir -p \/etc\/apt\/keyrings\r\n$ curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/docker.gpg\r\n$ sudo chmod a+r \/etc\/apt\/keyrings\/docker.gpg sudo chmod a+r \/etc\/apt\/keyrings\/docker.gpg\r\n<\/code><\/pre>\n<h3>\u6dfb\u52a0docker\u5b98\u65b9\u4ed3\u5e93<\/h3>\n<p>\u901a\u8fc7\u6267\u884c\u4e0b\u5217\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u5c06Docker\u8f6f\u4ef6\u5305\u7684\u6e90\u6dfb\u52a0\u5230\u7cfb\u7edf\u4e2d\uff1a<\/p>\n<pre class=\"post-pre\"><code>$ echo \"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/nullecho \"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\r\n<\/code><\/pre>\n<h3>\u91cd\u65b0\u66f4\u65b0\u5305\u88f9\u4fe1\u606f<\/h3>\n<p>\u4e3a\u4e86\u80fd\u591f\u68c0\u6d4b\u5230Docker\u8f6f\u4ef6\u5305\uff0c\u5fc5\u987b\u8fdb\u884c\u66f4\u65b0\uff0c\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u3002\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u4f7f\u7528apt install\u547d\u4ee4\u5c06Docker\u955c\u50cf\u6dfb\u52a0\u5230\u7cfb\u7edf\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>$  sudo apt update sudo apt update\r\n<\/code><\/pre>\n<h3>\u5b89\u88c5\u4ee5\u4e0b3\u4e2a\u6700\u65b0\u7248\u672c\u7684Docker Community Edition\uff08CE\uff09\uff1a<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker-ce\uff1aDocker Engine\u306e\u30c7\u30fc\u30e2\u30f3<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker-ce-cli\uff1a\u64cd\u4f5c\u3059\u308b\u3053\u3068\u306b\u306a\u308bDocker CLI\u300cCLI\u3068\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u7565\u79f0\u300d<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">containerd.io\uff1a\u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u3068\u5b9f\u884c\u306b\u5229\u7528\u3059\u308b<\/ul>\n<p>\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo apt install docker-ce docker-ce-cli containerd.io\r\nReading package lists... 0%Reading package lists... 100%Reading package lists... Done\r\nBuilding dependency tree... 0%Building dependency tree... 0%Building dependency tree... 50%Building dependency tree... 50%Building dependency tree... Done\r\nReading state information... 0% Reading state information... 0%Reading state information... Done\r\ncontainerd.io is already the newest version (1.6.21-1).\r\ndocker-ce-cli is already the newest version (5:24.0.2-1~ubuntu.22.04~jammy).\r\ndocker-ce is already the newest version (5:24.0.2-1~ubuntu.22.04~jammy).\r\n0 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.\r\n<\/code><\/pre>\n<h3>\u8fdb\u884c\u7248\u672c\u786e\u8ba4<\/h3>\n<p>\u5982\u679c\u51fa\u529b\u6b63\u786e\uff0c\u5b89\u88c5\u5c06\u6210\u529f\uff0c\u6267\u884c\u4e0b\u8ff0\u64cd\u4f5c\u3002<\/p>\n<pre class=\"post-pre\"><code>root@nizeki-ubuntu:~# docker -v\r\nDocker version 24.0.2, build cb74dfc\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u53c2\u8003\u4ee5\u4e0b\u7f51\u7ad9 \u5173\u4e8eDocker\u7684\u4e8b\u9879 &nbsp; \u5efa\u6784\u6b65\u9aa4 &nbsp; \u4efb\u52a1\u5185\u5bb9 \u4f7f\u7528 apt \u5b58\u50a8\u5e93\u5b89 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-35151","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u5728ubuntu-22-04\u4e0a\u6784\u5efadocker\u7684\u6b65\u9aa4\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4\" \/>\n<meta property=\"og:description\" content=\"\u8bf7\u53c2\u8003\u4ee5\u4e0b\u7f51\u7ad9 \u5173\u4e8eDocker\u7684\u4e8b\u9879 &nbsp; \u5efa\u6784\u6b65\u9aa4 &nbsp; \u4efb\u52a1\u5185\u5bb9 \u4f7f\u7528 apt \u5b58\u50a8\u5e93\u5b89 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728ubuntu-22-04\u4e0a\u6784\u5efadocker\u7684\u6b65\u9aa4\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-25T15:50:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T18:32:17+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/\",\"name\":\"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-25T15:50:58+00:00\",\"dateModified\":\"2024-04-29T18:32:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u5728ubuntu-22-04\u4e0a\u6784\u5efadocker\u7684\u6b65\u9aa4\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4","og_description":"\u8bf7\u53c2\u8003\u4ee5\u4e0b\u7f51\u7ad9 \u5173\u4e8eDocker\u7684\u4e8b\u9879 &nbsp; \u5efa\u6784\u6b65\u9aa4 &nbsp; \u4efb\u52a1\u5185\u5bb9 \u4f7f\u7528 apt \u5b58\u50a8\u5e93\u5b89 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728ubuntu-22-04\u4e0a\u6784\u5efadocker\u7684\u6b65\u9aa4\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-25T15:50:58+00:00","article_modified_time":"2024-04-29T18:32:17+00:00","author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/","name":"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-25T15:50:58+00:00","dateModified":"2024-04-29T18:32:17+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728Ubuntu 22.04\u4e0a\u6784\u5efaDocker\u7684\u6b65\u9aa4"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8ubuntu-22-04%e4%b8%8a%e6%9e%84%e5%bb%badocker%e7%9a%84%e6%ad%a5%e9%aa%a4%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=35151"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35151\/revisions"}],"predecessor-version":[{"id":89149,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/35151\/revisions\/89149"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=35151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=35151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=35151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}