{"id":5168,"date":"2022-07-08T06:12:48","date_gmt":"2022-07-07T21:12:48","guid":{"rendered":"https:\/\/katblog.manadream.net\/?p=5168"},"modified":"2022-07-11T21:21:30","modified_gmt":"2022-07-11T12:21:30","slug":"centos-docker","status":"publish","type":"post","link":"https:\/\/katblog.manadream.net\/index.php\/2022\/07\/08\/centos-docker\/","title":{"rendered":"\u3010\u7c21\u5358\u3011CentOS\u306bdocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001kat\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001CentOS\u306bdocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n<h2 class=\"wp-block-heading\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u53e4\u3044docker\u3092\u524a\u9664<\/h3>\n\n\n<p>\u53e4\u3044docker\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u524a\u9664\u3057\u3066\u304a\u304d\u307e\u3059\u3002\uff08root\u4ee5\u5916\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u884c\u3059\u308b\u5834\u5408\u306f\u9069\u5b9c\u300csudo\u300d\u3092\u30b3\u30de\u30f3\u30c9\u306e\u524d\u306b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ yum 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<\/pre><\/div>\n\n<p>\u3053\u3053\u3067\u3001\u3053\u308c\u3089\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3044\u3063\u305f\u8b66\u544a\u304c\u51fa\u3066\u3082\u7279\u306b\u554f\u984c\u306a\u3044\u3067\u3059\u3002<\/p>\n\n\n<h3 class=\"wp-block-heading\">\u30ea\u30dd\u30b8\u30c8\u30ea\u8a2d\u5b9a<\/h3>\n\n\n<p>\u6b21\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ yum install -y yum-utils\n\n$ yum-config-manager \\\n    --add-repo \\\n    https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">docker\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n<p>\u6700\u5f8c\u306b\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u7279\u5b9a\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306edocker\u306b\u5207\u308a\u66ff\u3048<\/h3>\n\n\n<p>docker\u3092\u7279\u5b9a\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u307e\u305a\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ yum list docker-ce --showduplicates | sort -r\n\n\u2193\u51fa\u529b\u4f8b\ndocker-ce.x86_64  3:18.09.1-3.el7                     docker-ce-stable\ndocker-ce.x86_64  3:18.09.0-3.el7                     docker-ce-stable\ndocker-ce.x86_64  18.06.1.ce-3.el7                    docker-ce-stable\ndocker-ce.x86_64  18.06.0.ce-3.el7                    docker-ce-stable\n<\/pre><\/div>\n\n<p>\u4e0a\u8a18\u306e\u300c3:18.09.1-3.el7\u300d\u306e\u3088\u3046\u306a\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e<strong>\u300c:\u300d\u304b\u3089\u300c-\u300d\u307e\u3067\u306e\u9593\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7<\/strong>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u6307\u5b9a\u3059\u308b\u969b\u306f\u3001<span style=\"color: #0000ff;\"><strong>docker-ce-{\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7}\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u540d<\/strong><\/span>\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u4e0a\u8a18\u306e\u5834\u5408\u306f\u300cdocker-ce-18.09.1\u300d\u3068\u306a\u308a\u307e\u3059<\/p>\n<p>\u6b21\u306b\u3001\u4e0a\u8a18\u306e\u51fa\u529b\u3092\u3082\u3068\u306b\u3001\u5909\u66f4\u3057\u305f\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ yum install docker-ce-{\u30d0\u30fc\u30b8\u30e7\u30f3\u540d} docker-ce-cli-{\u30d0\u30fc\u30b8\u30e7\u30f3\u540d} containerd.io docker-compose-plugin\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">docker\u30b5\u30fc\u30d3\u30b9\u8d77\u52d5<\/h3>\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u3089\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067docker\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ systemctl start docker\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n\n\n<p>\u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u304b\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ docker run hello-world\n<\/pre><\/div>\n\n<p>\u5b9f\u884c\u5f8c\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u51fa\u529b\u304c\u3055\u308c\u308c\u3070\u3001\u554f\u984c\u306a\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nUnable to find image 'hello-world:latest' locally\nlatest: Pulling from library\/hello-world\n2db29710123e: Pull complete \nDigest: sha256:13e367d31ae85359f42d637adf6da428f76d75dc9afeb3c21faea0d976f5c651\nStatus: Downloaded newer image for hello-world:latest\n\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n\nTo generate this message, Docker took the following steps:\n 1. The Docker client contacted the Docker daemon.\n 2. The Docker daemon pulled the &quot;hello-world&quot; image from the Docker Hub.\n    (amd64)\n 3. The Docker daemon created a new container from that image which runs the\n    executable that produces the output you are currently reading.\n 4. The Docker daemon streamed that output to the Docker client, which sent it\n    to your terminal.\n\nTo try something more ambitious, you can run an Ubuntu container with:\n $ docker run -it ubuntu bash\n\nShare images, automate workflows, and more with a free Docker ID:\n https:\/\/hub.docker.com\/\n\nFor more examples and ideas, visit:\n https:\/\/docs.docker.com\/get-started\/\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h2>\n\n\n<p>\u3044\u304b\u304c\u3060\u3063\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u4eca\u56de\u306fCentOS\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3057\u305f\u304c\u3001Ubuntu\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u6bd4\u3079\u308b\u3068\u591a\u5c11\u30b3\u30de\u30f3\u30c9\u304c\u5c11\u306a\u304f\u611f\u3058\u307e\u3057\u305f\u3002<\/p>\n<p>\u672c\u5f53\u306f\u30b3\u30de\u30f3\u30c91\u3064\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u308c\u3070\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u6570\u5206\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u3053\u307e\u3067\u624b\u9593\u306b\u306f\u611f\u3058\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306f<a href=\"https:\/\/docs.docker.com\/engine\/install\/centos\/\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u306b\u8a18\u8f09\u306e\u5185\u5bb9\u3068\u307b\u307c\u540c\u3058\u306b\u306f\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u5099\u5fd8\u9332\u3068\u3057\u3066\u3082\u8a18\u4e8b\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u4e0a\u3001\u300cCentOS\u306bdocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u300d\u3067\u3057\u305f\u301c<\/p>\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u8003<\/h2>\n\n\n<p><a href=\"_wp_link_placeholder\" data-wplink-edit=\"true\">https:\/\/docs.docker.com\/engine\/install\/centos\/<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001kat\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001CentOS\u306bdocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 \u53e4\u3044docker\u3092\u524a\u9664 \u53e4\u3044docker\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u304c\u3042<\/p>\n","protected":false},"author":1,"featured_media":5189,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_locale":"ja","_original_post":"https:\/\/katblog.manadream.net\/?p=5168","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[141],"tags":[146,142,145,144],"class_list":["post-5168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","tag-centos","tag-docker","tag-install","tag-os","ja"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/katblog.manadream.net\/wp-content\/uploads\/2022\/07\/kuzira.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paUgnN-1lm","_links":{"self":[{"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/posts\/5168"}],"collection":[{"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/comments?post=5168"}],"version-history":[{"count":1,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/posts\/5168\/revisions"}],"predecessor-version":[{"id":5169,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/posts\/5168\/revisions\/5169"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/media\/5189"}],"wp:attachment":[{"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/media?parent=5168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/categories?post=5168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/katblog.manadream.net\/index.php\/wp-json\/wp\/v2\/tags?post=5168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}