{"id":8323,"date":"2017-10-18T13:40:38","date_gmt":"2017-10-18T05:40:38","guid":{"rendered":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/?p=8323"},"modified":"2024-04-09T07:48:54","modified_gmt":"2024-04-08T23:48:54","slug":"%e6%96%b0%e5%8c%97%e5%b8%82%e6%95%99%e8%82%b2%e5%b1%80%e7%a8%8b%e5%bc%8f%e6%87%89%e7%94%a8%e7%a0%94%e7%99%bc%e7%a4%be%e7%be%a4%e5%b7%a5%e4%bd%9c%e5%9d%8a%ef%bc%9adocker1061018","status":"publish","type":"post","link":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/archives\/8323","title":{"rendered":"\u65b0\u5317\u5e02\u6559\u80b2\u5c40\u7a0b\u5f0f\u61c9\u7528\u7814\u767c\u793e\u7fa4\u5de5\u4f5c\u574a\uff1aDocker(1061018)"},"content":{"rendered":"<h3>\u65e5\u671f\uff1a106\u5e7410\u670818\u65e5\u4e0b\u5348 1:30 \u2013 4:30<\/h3>\n<h3>\u5730\u9ede\uff1a\u6559\u7814\u4e2d\u5fc3\u96fb\u8166\u6559\u5ba4<\/h3>\n<h3>\u4e3b\u984c\uff1aDocker<\/h3>\n<h3>\u8b1b\u5e2b\uff1a\u6797\u58eb\u7acb\u8001\u5e2b<\/h3>\n<h3>\u4e0a\u8ab2\u6559\u6750\uff1a<a href=\"http:\/\/bit.ly\/t301000-docker-script\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/bit.ly\/t301000-docker-script<\/a><\/h3>\n<h3><a href=\"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-content\/uploads\/2017\/10\/Docker-Container-\u5b89\u88dd\u6f14\u7df4\u904e\u7a0b.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Docker Container \u5b89\u88dd\u6f14\u7df4\u904e\u7a0b<\/a><\/h3>\n<h4>ubuntu \u524d\u7f6e\u4f5c\u696d<\/h4>\n<h4>\u67e5\u770b\u7db2\u5361 ip<\/h4>\n<p style=\"padding-left: 30px;\">ifconfig<\/p>\n<h4>\u8a2d\u5b9a\u56fa\u5b9a ip<\/h4>\n<p><span style=\"font-weight: 400;\">https:\/\/www.linuxhint.com\/change-from-dhcp-to-static-ip-address-ubuntu\/<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"> sudo vi \/etc\/network\/interfaces<\/span><\/li>\n<\/ol>\n<pre class=\"language-bash\"><span style=\"font-weight: 400;\">iface <\/span><span style=\"font-weight: 400;\">enp0s3<\/span><span style=\"font-weight: 400;\"> inet static<\/span>\r\n<span style=\"font-weight: 400;\">address 192.168.0.55<\/span>\r\n<span style=\"font-weight: 400;\">netmask 255.255.255.0<\/span>\r\n<span style=\"font-weight: 400;\">gateway 192.168.0.1<\/span>\r\n<span style=\"font-weight: 400;\">dns-nameservers 168.95.192.1 8.8.8.8<\/span><\/pre>\n<ol start=\"2\">\n<li><span style=\"font-weight: 400;\"> reboot<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<h4>\u5f37\u5236 apt \u8d70 ipv4<\/h4>\n<p><a href=\"https:\/\/www.vultr.com\/docs\/force-apt-get-to-ipv4-or-ipv6-on-ubuntu-or-debian\"><span style=\"font-weight: 400;\">https:\/\/www.vultr.com\/docs\/force-apt-get-to-ipv4-or-ipv6-on-ubuntu-or-debian<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">sudo vi \/etc\/apt\/apt.conf.d\/99force-ipv4<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-weight: 400;\">Acquire::ForceIPv4 <\/span><span style=\"font-weight: 400;\">\u201d<\/span><span style=\"font-weight: 400;\">true<\/span><span style=\"font-weight: 400;\">\u201d<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<h4>\u5efa\u8b70\u5b89\u88dd\uff1a<\/h4>\n<p><span style=\"font-weight: 400;\">sudo apt install unzip git vim<\/span><\/p>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<h4>\u5b89\u88dd docker<\/h4>\n<p><a href=\"https:\/\/get.docker.com\"><span style=\"font-weight: 400;\">https:\/\/get.docker.com<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">curl -fsSL get.docker.com -o get-docker.sh<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sh get-docker.sh<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo usermod -aG docker <\/span><span style=\"font-weight: 400;\">your_user<\/span><\/p>\n<h4>\u91cd\u65b0\u767b\u5165<\/h4>\n<h4>\u67e5\u770b docker \u7248\u672c<\/h4>\n<p><span style=\"font-weight: 400;\">docker -v<\/span><\/p>\n<p><span style=\"font-weight: 400;\">docker version<\/span><\/p>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<h4>\u5b89\u88dd docker-compose<\/h4>\n<p><a href=\"https:\/\/docs.docker.com\/compose\/install\/\"><span style=\"font-weight: 400;\">https:\/\/docs.docker.com\/compose\/install\/<\/span><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/docker\/compose\/releases\"><span style=\"font-weight: 400;\">https:\/\/github.com\/docker\/compose\/releases<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">curl -L https:\/\/github.com\/docker\/compose\/releases\/download\/1.16.1\/docker-compose-`uname -s`-`uname -m` &gt; docker-compose<\/span><\/p>\n<p><span style=\"font-weight: 400;\">chmod +x docker-compose<\/span><\/p>\n<p><span style=\"font-weight: 400;\">sudo mv docker-compose \/usr\/local\/bin\/docker-compose<\/span><\/p>\n<h4>\u67e5\u770b docker-compose \u7248\u672c<\/h4>\n<p><span style=\"font-weight: 400;\">docker-compose -v<\/span><\/p>\n<p><span style=\"font-weight: 400;\">docker-compose version<\/span><\/p>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<h4>Docker \u2014\u2014 \u5f9e\u5165\u9580\u5230\u5be6\u8e10<\/h4>\n<p><a href=\"https:\/\/www.gitbook.com\/book\/philipzheng\/docker_practice\/details\"><span style=\"font-weight: 400;\">https:\/\/www.gitbook.com\/book\/philipzheng\/docker_practice\/details<\/span><\/a><\/p>\n<h4>Docker \u57fa\u672c\u6559\u5b78 &#8211; \u5f9e\u7121\u5230\u6709<\/h4>\n<p><a href=\"https:\/\/github.com\/twtrubiks\/docker-tutorial\"><span style=\"font-weight: 400;\">https:\/\/github.com\/twtrubiks\/docker-tutorial<\/span><\/a><\/p>\n<h4>\u4fee\u884c\u9053\u5834<\/h4>\n<p><a href=\"https:\/\/www.katacoda.com\/\"><span style=\"font-weight: 400;\">https:\/\/www.katacoda.com\/<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">=================================<\/span><\/p>\n<p><a href=\"https:\/\/hub.docker.com\/\"><span style=\"font-weight: 400;\">https:\/\/hub.docker.com\/<\/span><\/a><\/p>\n<p><a href=\"http:\/\/laradock.io\/\"><span style=\"font-weight: 400;\">http:\/\/laradock.io\/<\/span><\/a><\/p>\n<p><a href=\"https:\/\/portainer.io\/\"><span style=\"font-weight: 400;\">https:\/\/portainer.io\/<\/span><\/a><\/p>\n<p><a href=\"http:\/\/bit.ly\/t301000-docker-script\"><span style=\"font-weight: 400;\">http:\/\/bit.ly\/t301000-docker-script<\/span><\/a><\/p>\n<p><a href=\"http:\/\/labs.play-with-docker.com\/\"><span style=\"font-weight: 400;\">http:\/\/labs.play-with-docker.com\/<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65e5\u671f\uff1a106\u5e7410\u670818\u65e5\u4e0b\u5348 1:30 \u2013 4:30 \u5730\u9ede\uff1a\u6559\u7814\u4e2d\u5fc3\u96fb\u8166\u6559\u5ba4 \u4e3b\u984c\uff1aDocker \u8b1b\u5e2b\uff1a\u6797\u58eb\u7acb\u8001\u5e2b \u4e0a\u8ab2\u6559\u6750\uff1ahttp:\/\/bit.ly\/t301000-docker-script Docker Container \u5b89\u88dd\u6f14\u7df4\u904e\u7a0b ubuntu \u524d\u7f6e\u4f5c\u696d \u67e5\u770b\u7db2\u5361 ip <\/p>\n<p style=\"padding-left: 30px;\">ifconfig<\/p>\n<p> \u8a2d\u5b9a\u56fa\u5b9a ip <\/p>\n<p>https:\/\/www.linuxhint.com\/change-from-dhcp-to-static-ip-address-ubuntu\/<\/p>\n<p> sudo vi \/etc\/network\/interfaces iface enp0s3 inet static address 192.168.0.55 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 168.95.192.1 8.8.8.8 reboot <\/p>\n<p>=================================<\/p>\n<p> \u5f37\u5236 apt \u8d70 ipv4 <\/p>\n<p>https:\/\/www.vultr.com\/docs\/force-apt-get-to-ipv4-or-ipv6-on-ubuntu-or-debian<\/p>\n<p>sudo vi \/etc\/apt\/apt.conf.d\/99force-ipv4<\/p>\n<p style=\"padding-left: 30px;\">Acquire::ForceIPv4 \u201dtrue\u201d;<\/p>\n<p>=================================<\/p>\n<p> \u5efa\u8b70\u5b89\u88dd\uff1a <\/p>\n<p>sudo apt [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[34],"tags":[],"_links":{"self":[{"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/posts\/8323"}],"collection":[{"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=8323"}],"version-history":[{"count":0,"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/posts\/8323\/revisions"}],"wp:attachment":[{"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=8323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=8323"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/webnas.bhes.ntpc.edu.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=8323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}