{"id":463,"date":"2021-05-28T14:14:30","date_gmt":"2021-05-28T06:14:30","guid":{"rendered":"https:\/\/22pig.com\/?p=463"},"modified":"2021-05-28T14:14:30","modified_gmt":"2021-05-28T06:14:30","slug":"%e5%ae%89%e8%a3%85%e6%9c%80%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84docker%e5%92%8cdocker-compose","status":"publish","type":"post","link":"http:\/\/22pig.com\/?p=463","title":{"rendered":"\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684docker\u548cdocker-compose"},"content":{"rendered":"<h3>1. docker<\/h3>\n<pre class=\"hljs properties codeblock\"><code class=\"hljs\"><span class=\"hljs-comment\"># \u5378\u8f7d\u65e7\u7248\u672c\n<span class=\"hljs-attr\">yum <span class=\"hljs-string\">remove docker \\\n                  docker-client \\\n                  docker-client-latest \\\n                  docker-common \\\n                  docker-latest \\\n                  docker-latest-logrotate \\\n                  docker-logrotate \\\n                  docker-engine\n<\/span><\/span><\/span><\/code><\/pre>\n<pre class=\"hljs properties codeblock\"><code class=\"hljs\"><span class=\"hljs-comment\"># \u5b89\u88c5yum-utils\n<span class=\"hljs-attr\">yum <span class=\"hljs-string\">install -y yum-utils\n\n# \u8bbe\u7f6e\u7a33\u5b9a\u7684\u5b58\u50a8\u5e93\n<span class=\"hljs-meta\">yum-config-manager \\\n    --add-repo \\\n    http:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo\n<\/span><\/span><\/span><\/span><\/code><\/pre>\n<p>\u5b89\u88c5<\/p>\n<pre class=\"hljs properties codeblock\"><code class=\"hljs\"><span class=\"hljs-comment\"># \u5b89\u88c5\n<span class=\"hljs-attr\">yum <span class=\"hljs-string\">install docker-ce docker-ce-cli containerd.io\n\n# \u7248\u672c\ndocker -v\n<\/span><\/span><\/span><\/code><\/pre>\n<h3>2. docker-compose<\/h3>\n<pre class=\"hljs perl codeblock\"><code class=\"hljs\">\ncurl -L https:<span class=\"hljs-regexp\">\/\/github.com\/docker\/compose\/releases\/download\/<span class=\"hljs-number\">1.28.5\/docker-compose-<span class=\"hljs-string\">`uname -s`-`uname -m` -o \/usr\/<span class=\"hljs-keyword\">local\/bin\/docker-compose\n\nchmod +x \/usr\/local\/bin\/docker-compose\n\ndocker-compose --version<\/span><\/span><\/span><\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. docker # \u5378\u8f7d\u65e7\u7248\u672c yum remove docker \\ docker-client \\ docker-client-latest \\ docker-common \\ docker-latest \\ docker-latest-logrotate \\ docker-logrotate \\ docker-engine # \u5b89\u88c5yum-utils yum install -y yum-utils # \u8bbe\u7f6e\u7a33\u5b9a\u7684\u5b58\u50a8\u5e93 yum-config-manager \\ &#8211;add-repo \\ http:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo \u5b89\u88c5 # \u5b89\u88c5 yum install docker-ce docker-ce-cli containerd.io # \u7248\u672c docker -v 2. docker-compose curl -L https:\/\/github.com\/docker\/compose\/releases\/download\/1.28.5\/docker-compose-`uname -s`-`uname -m` -o \/usr\/local\/bin\/docker-compose &#8230; <a title=\"\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684docker\u548cdocker-compose\" class=\"read-more\" href=\"http:\/\/22pig.com\/?p=463\" aria-label=\"More on \u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684docker\u548cdocker-compose\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-463","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=463"}],"version-history":[{"count":0,"href":"http:\/\/22pig.com\/index.php?rest_route=\/wp\/v2\/posts\/463\/revisions"}],"wp:attachment":[{"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/22pig.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}