{"id":1037,"date":"2020-03-10T10:58:32","date_gmt":"2020-03-10T01:58:32","guid":{"rendered":"https:\/\/www.kwonline.org\/memo2\/?p=1037"},"modified":"2020-03-25T15:02:53","modified_gmt":"2020-03-25T06:02:53","slug":"run-docker-on-ubuntu-19_10-eoan","status":"publish","type":"post","link":"https:\/\/www.kwonline.org\/memo2\/2020\/03\/10\/run-docker-on-ubuntu-19_10-eoan\/","title":{"rendered":"Ubuntu 19.10: Docker \u3092\u4f7f\u3046"},"content":{"rendered":"<p>Ubuntu 19.10\u306bDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<h3>Docker\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u53c2\u8003\u306b\u3057\u305f\u30b5\u30a4\u30c8\u306f\u3053\u3053\u3002<br \/>\n<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-and-use-docker-on-ubuntu-18-04\" rel=\"noopener noreferrer\" target=\"_blank\">How To Install and Use Docker on Ubuntu 18.04 | DigitalOcean<\/a><\/p>\n<p>\u307e\u305a\u306f\u5fc5\u8981\u306a\u3082\u306e\u3092apt\u3067\u5165\u308c\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\r\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -\r\n<\/pre>\n<p>\u305d\u308c\u304b\u3089\u30ec\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u3057\u3066\u3001docker-ce\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n19.10\u306a\u306e\u3067eoan.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo add-apt-repository &quot;deb &#x5B;arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu eoan stable&quot;\r\nsudo apt update\r\nsudo apt install docker-ce\r\n<\/pre>\n<h3>\u30b3\u30f3\u30c6\u30ca\u306e\u5b9f\u884c<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u51fa\u6765\u305f\u306e\u3067\u3001\u8a66\u3057\u306b\u516c\u5f0f\u306eubuntu\u30a4\u30e1\u30fc\u30b8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066Docker\u3067\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker pull ubuntu\r\n<\/pre>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u5b9f\u884c\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker run -itd ubuntu\r\n<\/pre>\n<p>\u30b7\u30a7\u30eb\u306b\u5165\u308a\u305f\u3044\u5834\u5408\u306f\u3001ps\u3067\u30b3\u30f3\u30c6\u30caID\/\u30b3\u30f3\u30c6\u30ca\u540d\u3092\u8abf\u3079\u3066attach\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker ps -l\r\nCONTAINER ID    IMAGE       COMMAND     CREATED             STATUS                      PORTS   NAMES\r\n34567890abcd    ubuntu      &quot;\/bin\/bash&quot; 18 minutes ago      Exited (0) 4 seconds ago            hardcore_heisenberg\r\n<\/pre>\n<p>\u4e0a\u8a18\u306e34567890abcd\u306battach<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker attach 34567890abcd\r\n<\/pre>\n<p>\u3053\u308c\u3067root\u30ed\u30b0\u30a4\u30f3\u51fa\u6765\u308b\u306e\u3067\u3001\u3042\u3068\u306f\u5fc5\u8981\u306a\u74b0\u5883\u3092\u63c3\u3048\u308b\u3002<br \/>\n\u4f8b\u3048\u3070vim\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt install -y vim\r\n<\/pre>\n<p>\u30b3\u30f3\u30bd\u30fc\u30eb\u304b\u3089\u629c\u3051\u51fa\u305f\u3044\u6642\u306f Ctrl+P \u3092\u62bc\u3057\u3066\u304b\u3089 Ctrl+Q \u3067\u51fa\u308c\u308b\u3002<br \/>\nCtrl+D\u3092\u62bc\u3059\u3068\u30b3\u30f3\u30c6\u30ca\u304c\u7d42\u4e86\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<p>\u30b3\u30f3\u30c6\u30ca\u3092\u505c\u6b62\u3059\u308b\u5834\u5408\u306fstop<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker stop 34567890abcd\r\n<\/pre>\n<h3>DockerHub\u306bpush<\/h3>\n<p>\u5909\u66f4\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092DockerHub\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u306b\u306f\u307e\u305a\u306f<a href=\"https:\/\/hub.docker.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">DockerHub<\/a>\u3067\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>\u5909\u66f4\u5185\u5bb9\u3092commit.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker commit -m 'vim installed' -a 'orenomemo' 34567890abcd orenorepo\/myubuntu\r\n<\/pre>\n<p>\u3053\u3053\u3067orenorepo\u304cDockerHub\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u540d\u3067myubuntu\u304c\u30a4\u30e1\u30fc\u30b8\u540d<\/p>\n<p>\u30ed\u30fc\u30ab\u30eb\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306fimages.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker images\r\nREPOSITORY            TAG                 IMAGE ID            CREATED             SIZE\r\noreno_repo\/myubuntu   latest              1234567890ab        17 minutes ago      152MB\r\n<\/pre>\n<p>\u305d\u3057\u3066DockerHub\u306b\u30ed\u30b0\u30a4\u30f3<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker login -u orenorepo\r\n<\/pre>\n<p>\u6700\u5f8c\u306bpush.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo docker push orenorepo\/myubuntu\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 19.10\u306bDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002 Docker\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u53c2\u8003\u306b\u3057\u305f\u30b5\u30a4\u30c8\u306f\u3053\u3053\u3002 How To Install and Use Docker on Ubuntu 18.04 | D [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1037","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/comments?post=1037"}],"version-history":[{"count":7,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1037\/revisions"}],"predecessor-version":[{"id":1055,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1037\/revisions\/1055"}],"wp:attachment":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/media?parent=1037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/categories?post=1037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/tags?post=1037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}