{"id":1794,"date":"2023-02-21T14:21:12","date_gmt":"2023-02-21T06:21:12","guid":{"rendered":"https:\/\/km94.com\/?p=1794"},"modified":"2023-02-21T14:21:12","modified_gmt":"2023-02-21T06:21:12","slug":"hostwinds%e6%95%99%e7%a8%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu%e4%b8%8a%e5%ae%89%e8%a3%85docker","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/hostwinds%e6%95%99%e7%a8%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu%e4%b8%8a%e5%ae%89%e8%a3%85docker\/","title":{"rendered":"Hostwinds\u6559\u7a0b\uff1a\u5982\u4f55\u5728Ubuntu\u4e0a\u5b89\u88c5Docker"},"content":{"rendered":"<p>Docker\u662f\u4e00\u4e2a\u5f00\u6e90\u8f7b\u91cf\u7ea7\u7684\u5bb9\u5668\u7ba1\u7406\u7cfb\u7edf\uff0c\u4e3b\u8981\u8fd0\u884c\u4e8eLinux\u548cWindows\uff0c\u9002\u7528\u4e8e\u4e91\u8ba1\u7b97\u9700\u6c42\u3002Hostwinds\u7f8e\u56fd\u4e3b\u673a\u5546\u8fd1\u51e0\u5e74\u9887\u53d7\u56fd\u5185\u7ad9\u957f\u9752\u7750\uff0c\u5c24\u5176\u662f\u65d7\u4e0b<span class=\"wp_keywordlink\">\u7f8e\u56fd\u4e91\u4e3b\u673a<\/span>VPS\u3001\u4e13\u7528\u670d\u52a1\u5668\u7b49\u70ed\u95e8\u4ea7\u54c1\uff0c\u90a3\u4e48\u5982\u4f55\u5c06Docker\u5b89\u88c5\u5230Hostwinds VPS\u4e0a\u5462\uff1f\u672c\u6587\u5c06\u4ecb\u7ecd\u4e0b\u5728Ubuntu\u4e0a\u5b89\u88c5Docker\u7684\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n<p>\n\t<figure class=\"wp-block-image size-full\"><img decoding=\"async\" class=\"wp-image-1796\" alt=\"Docker\u5b89\u88c5\u6559\u7a0b\" src=\"https:\/\/km94.com\/wp-content\/uploads\/2023\/02\/docker-1.jpg\"><\/figure>\n\t<\/p>\n<p>\u6b65\u9aa41\u3001\u9996\u5148\u60a8\u53ef\u4ee5\u4f7f\u7528SSH\u767b\u5f55\u5230\u60a8\u7684Hostwinds VPS\uff0c\u5e76\u786e\u4fdd\u60a8\u7684Ubuntu\u64cd\u4f5c\u7cfb\u7edf\u662f\u6700\u65b0\u7684\u3002<\/p>\n<p>\u6b65\u9aa42\u3001\u63a5\u4e0b\u6765\u60a8\u8981\u4e3a Ubuntu \u5b89\u88c5 docker \u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo apt-get install \\<br>\napt-transport-https \\<br>\nca-certificates \\<br>\ncurl \\<br>\nGnuPG-agent \\<br>\nsoftware-properties-common<\/code><\/pre>\n<p>\u6b65\u9aa43\u3001\u5c06 GPG \u5bc6\u94a5\u6dfb\u52a0\u5230\u5bc6\u94a5\u73af\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add &#8211;<\/code><\/pre>\n<p>\u68c0\u67e5 Docker \u6587\u6863\u4ee5\u83b7\u53d6\u5f53\u524d\u6307\u7eb9\u3002<\/p>\n<p>\u6b65\u9aa44\u3001\u68c0\u67e5\u5bc6\u94a5\u6307\u7eb9\u4ee5\u786e\u4fdd\u5339\u914d\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo apt-key fingerprint 0EBFCD88<\/code><\/pre>\n<p>\u5982\u679c\u6307\u7eb9\u4e0d\u5339\u914d\uff0c\u5efa\u8bae\u67e5\u770b Docker \u5b98\u65b9\u6587\u6863\u4ee5\u83b7\u53d6\u6700\u65b0\u6307\u7eb9\u3002<\/p>\n<p>\u6b65\u9aa45\u3001\u5c06\u5b58\u50a8\u5e93\u6dfb\u52a0\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684\u5217\u8868\u4e2d\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo add-apt-repository \\<br>\n&#8220;deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu \\<br>\n(lsb_release -cs) \\<br>\nstable&#8221;<\/code><\/pre>\n<p>\u6b65\u9aa46\u3001\u786e\u4fdd Apt \u5305\u7d22\u5f15\u662f\u6700\u65b0\u7684\u3002\uff08\u8fd9\u5f88\u91cd\u8981\uff0c\u5c24\u5176\u662f\u5728\u6dfb\u52a0\u5b58\u50a8\u5e93\u4e4b\u540e\u3002\uff09<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo apt-get update<\/code><\/pre>\n<p>\u6b65\u9aa47\u3001\u5b89\u88c5 Docker \u5f15\u64ce\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo apt-get install docker-ce docker-ce-cli containerd.io<\/code><\/pre>\n<p>\u6b65\u9aa48\u3001\u901a\u8fc7\u4e0b\u8f7d\u5e76\u8fd0\u884c Docker \u63d0\u4f9b\u7684 hello-world \u5bb9\u5668\u6765\u786e\u4fdd Docker \u6b63\u5728\u8fd0\u884c\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">sudo docker run hello-world<\/code><\/pre>\n<p>\u8fd0\u884c\u4e0a\u9762\u7684\u547d\u4ee4\u4e0b\u8f7d\u5b98\u65b9 Docker \u6d4b\u8bd5\u955c\u50cf\u5e76\u5728\u65b0\u5bb9\u5668\u4e2d\u8fd0\u884c\u5b83\u3002\u5f53\u5b83\u8fd0\u884c\u65f6\uff0c\u5b83\u53ea\u4f1a\u6253\u5370\u4e00\u6761\u6d88\u606f\u5e76\u9000\u51fa\u3002\u8fd9\u6837\u8868\u793a\u60a8\u5c06Docker\u5df2\u6210\u529f\u5b89\u88c5\u5230Hostwinds Ubuntu\u670d\u52a1\u5668\uff0c\u540e\u7eed\u60a8\u4fbf\u53ef\u4ee5\u4f7f\u7528\u5b83\u4e86\u3002<\/p>\n\n<div>\n<div>\n\n\n\n<\/div>\n<div>\n\n\n\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Docker\u662f\u4e00\u4e2a\u5f00\u6e90\u8f7b\u91cf\u7ea7\u7684\u5bb9\u5668\u7ba1\u7406\u7cfb\u7edf\uff0c\u4e3b\u8981\u8fd0\u884c\u4e8eLinux\u548cWindows\uff0c\u9002\u7528\u4e8e\u4e91\u8ba1\u7b97\u9700\u6c42\u3002Hostw&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1795,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,2],"tags":[],"class_list":["post-1794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zjjc","category-jc","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/1794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1794"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/1794\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}