{"id":38006,"date":"2020-02-18T10:23:18","date_gmt":"2020-02-18T02:23:18","guid":{"rendered":"http:\/\/4563.org\/?p=38006"},"modified":"2020-02-18T10:23:18","modified_gmt":"2020-02-18T02:23:18","slug":"%e3%80%90%e6%95%99%e7%a8%8b%e3%80%91%e9%b8%a1%e9%b8%a1%e5%a4%8d%e9%b8%a1%e9%b8%a1-docker%e5%bc%80%e5%b0%8f%e9%b8%a1","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=38006","title":{"rendered":"\u3010\u6559\u7a0b\u3011\u9e21\u9e21\u590d\u9e21\u9e21 Docker\u5f00\u5c0f\u9e21"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>walsh<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:19:57\t<\/p>\n<h3>\u3010\u6559\u7a0b\u3011\u9e21\u9e21\u590d\u9e21\u9e21 Docker\u5f00\u5c0f\u9e21<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 walsh \u4e8e 2019-12-5 17:19 \u7f16\u8f91 <\/p>\n<p> \u7eaf\u5c5e\u5a31\u4e50\u8bf7\u52ff\u5f53\u771f<br \/>  \u7eaf\u5c5e\u5a31\u4e50\u8bf7\u52ff\u5f53\u771f<br \/>  \u7eaf\u5c5e\u5a31\u4e50\u8bf7\u52ff\u5f53\u771f<\/p>\n<p>  \u83dc\u9e21\u5982\u4f55\u5728\u5c0f\u9e21\u4e0a\u518d\u5f00NAT\u5c0f\u9e21\u6ee1\u8db3\u865a\u8363\uff1f<\/p>\n<p>  \u5feb\u7528Docker\uff01\uff01\uff01 \u83dc\u9e21\u5f00\u9e21\u9e21 \u9e21\u9e21\u590d\u9e21\u9e21 \u5f00\u9e21\u4e00\u5f00\u7075 \u4ece\u6b64\u4e0d\u6320\u9e21<\/p>\n<p>  \u7b2c\u4e00\u6b65 \u5b89\u88c5Docker<br \/>  \u7528\u5b98\u65b9\u50bb\u74dc\u811a\u672c\u5b89\u88c5Docker<br \/>  curl -fsSL https:\/\/get.docker.com -o get-docker.sh<br \/>  sudo sh get-docker.sh<\/p>\n<p>  \u7b2c\u4e8c\u90e8 \u5b89\u88c5Portainer\u7ba1\u7406\u9762\u677f<br \/>  \u83dc\u9e21\u8fd9\u4e48\u83dc\u600e\u4e48\u53ef\u80fd\u547d\u4ee4\u884c<br \/>  \u7528\u5b98\u65b9\u6307\u5357\u7ed9\u51fa\u7684\u65b9\u5f0f\u5b89\u88c5\u9762\u677f \u6ce8\u610f\u4f7f\u7528\u4e868000\uff0c9000 \u8fd9\u4e24\u4e2a\u7aef\u53e3<br \/>  docker volume create portainer_data<br \/>  docker run -d -p 8000:8000 -p 9000:9000 -v \/var\/run\/docker.sock:\/var\/run\/docker.sock -v portainer_data:\/data portainer\/portainer<\/p>\n<p>  \u7b2c\u4e09\u6b65 \u767b\u5f55\u9762\u677f\u5f00\u5c0f\u9e21<br \/>  1.\u767b\u5f55\u9762\u677f\u5730\u5740\u4e3a \u4f60\u7684ip\u52a0\u7aef\u53e3\u53f79000<br \/>  \u521d\u6b21\u767b\u5f55\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u7ba1\u7406\u5458\u8d26\u53f7<br \/>  2. \u8bbe\u7f6e\u597d\u8d26\u53f7\u540e\u8fdb\u5165\u4e0b\u4e00\u4e2a\u754c\u9762\uff0c\u9009\u62e9Local\uff0c\u7136\u540e\u70b9connect\u8fde\u63a5\u672c\u5730\u670d\u52a1\u5668\u3002<br \/>  3. \u8bbe\u7f6e\u6b63\u786e\u540e\u8fdb\u5165\u9762\u677f\uff0c\u793a\u610f\u56fe\u5982\u4e0b<br \/>  https:\/\/sm.ms\/image\/i2uWK3Jy5GsaI9U<br \/>  4. \u70b9\u4e3b\u754c\u9762\u5de6\u4fa7\u7684container \u5bb9\u5668\u9875\u9762\uff0c\u7136\u540e\u70b9add container\u6dfb\u52a0\u65b0\u5bb9\u5668\uff0c\u4e5f\u5c31\u662f\u5f00\u5c0f\u9e21\u9e21\u9e21\u9e21<br \/>  https:\/\/sm.ms\/image\/HmXK4f87bVBwesN<br \/>  5. \u8fdb\u5165\u5f00\u5c0f\u9e21\u754c\u9762\u540e\u53c2\u8003\u4e0b\u56fe\u8fdb\u884c\u8bbe\u7f6e<br \/>  \u5728\u57081\u7684\u4f4d\u7f6e\u7ed9\u5c0f\u9e21\u8d77\u4e2a\u540d\u5b57\uff0c\u4f8b\u5982\u586b\u5199MJJ<br \/>  \u57082\u7684\u4f4d\u7f6e\u586b\u5199\u5c0f\u9e21\u7cfb\u7edf\uff0c\u50cf\u627e\u4e86\u4e00\u5708\uff0c\u6682\u65f6\u53ea\u627e\u5230\u4e2a\u5e26ssh\u7684Ubuntu\uff0c\u8bf7\u586b\u5199rastasheep\/ubuntu-sshd:latest<br \/>  \u57083\u7684\u4f4d\u7f6e\u8bbe\u7f6e\u7aef\u53e3\uff0c\u5de6\u4fa7\u662f\u6bcd\u9e21\u9e21\u7684\u7aef\u53e3\uff0c\u53f3\u4fa7\u662f\u5c0f\u9e21\u9e21\u7684\u7aef\u53e3\uff0c\u6211\u4eec\u5148\u5c06\u5c0f\u9e21\u768422\u7aef\u53e3\u53d1\u5e03\u5230\u6bcd\u9e21\u9e21\u76849999\u7aef\u53e3\u4e0a\uff08\u6b64\u7aef\u53e3\u968f\u610f\u4e0d\u51b2\u7a81\u5373\u53ef\uff09\uff0c\u4ee5\u4fbf\u4f7f\u7528ssh\u8fdc\u7a0b\u8fde\u63a5\u5c0f\u9e21\u9e21\uff0c\u5982\u679c\u8fd8\u9700\u8981\u5176\u4ed6\u7aef\u53e3\u53ef\u4ee5\u81ea\u884c\u6dfb\u52a0<br \/>  \u90fd\u8bbe\u7f6e\u597d\u540e\u70b9deploy the container\u6309\u94ae\u90e8\u7f72\uff0c\u7b49\u4e00\u4f1a\u513f\u540e\u5c0f\u9e21\u9e21\u5c31\u5f00\u597d\u4e86<br \/>  https:\/\/i.loli.net\/2019\/12\/05\/v9UQcibf1qehKIF.png<\/p>\n<p>  \u7b2c\u56db\u6b65 \u767b\u5f55\u5c0f\u9e21\u9e21<br \/>  IP: \u5c0f\u9e21\u9e21\u7684ip\u5c31\u662f\u4f60\u5927\u9e21\u9e21\u7684ip<br \/>  \u7aef\u53e3\uff1a\u4e4b\u524d\u53d1\u5e03\u7684\u7aef\u53e3\uff0c\u53739999<br \/>  \u7528\u6237\u540d\uff1aroot<br \/>  \u5bc6\u7801\uff1aroot<br \/>  \u767b\u9646\u540e\u7b2c\u4e00\u4ef6\u4e8b\uff1a\u7acb\u523b\u6539\u5bc6\u7801\uff01\uff01\uff01\u7acb\u523b\u6539\u5bc6\u7801\uff01\uff01\uff01<br \/>  passwd<br \/>  \u7136\u540e\u8fd9\u4e2a\u5c0f\u9e21\u57fa\u672c\u548c\u5176\u4ed6nat\u5c0f\u9e21\u6ca1\u5565\u533a\u522b\u4e86<br \/>  \u5982\u679c\u4ee5\u540e\u8981\u5f00\u542f\u66f4\u591a\u7aef\u53e3\uff0c\u6bd4\u5982\u653e\u4e00\u4e2a\u9178\u9178\u4e0a\u53bb\uff0c\u8bf7\u5728container\u5bb9\u5668\u9875\u9762\u91cc\u70b9\u51fb\u4f60\u7684\u5c0f\u9e21\uff0c\u9009\u62e9edit\/duplicate\uff0c\u4fee\u6539\u5c0f\u9e21\u8bbe\u7f6e\uff0c\u6dfb\u52a0\u65b0\u7684\u7aef\u53e3\uff0c\u7136\u540e\u91cd\u65b0\u90e8\u7f72<\/p>\n<p>  \u6ce8\u610f\u4e8b\u9879<br \/>  \u8fd9\u4e2a\u6559\u7a0b\u7eaf\u5c5e\u778e\u51e0\u628a\u4e71\u641e \u4ec5\u4f9b\u5a31\u4e50<br \/>  docker\u5176\u4ed6\u529f\u80fd\u8bf7\u81ea\u884c\u63a2\u7d22 http:\/\/www.dockerinfo.net\/document<br \/>  \u672c\u4eba\u6ca1\u6709\u4efb\u4f55\u6280\u672f\u80cc\u666f \u7eaf\u7cb9\u81ea\u5a31\u81ea\u4e50 \u96be\u514d\u758f\u6f0f\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>w5912460<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:29:09\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6211\u53bb\u8bd5\u8bd5\u770b\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Emporer<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:33:44\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9a6c\u514b\u4e00\u4e0b\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>wangjy<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:34:33\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9a6c\u4e0a\u8981\u6709\u4eba\u6765\u55b7\u4f60\u4e86:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>lijihede<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:39:17\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u6837\u73a9\u53ef\u4ee5\u3002ZSBD\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>qfdk<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:42:16\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 qfdk \u4e8e 2019-12-5 17:43 \u7f16\u8f91 <\/p>\n<p> \u4e07\u4e00\u641e\u4e0d\u597d \u4f1a\u88abrm -rf\u7684\u3002 \u8bdd\u8bf4\u8fd9\u6837\u7684\u5c0f\u9e21 \u8981\u662f\u91cd\u542f\u4e86\u6709\u65f6\u5019\u4f1a\u6389<br \/>  \u4ee5\u524d\u505a\u8fc7centos \u5e26sshd\u7684\u90a3\u79cd \u53d1\u73b0\u4e0d\u597d\u73a9\u513f \u5c31\u5220\u6389\u4e86\u3002<\/p>\n<p>  \u53e6\u5916\u5b89\u5229\u4e00\u6ce2 https:\/\/github.com\/qfdk\/EasyDockerWeb<\/p>\n<p>  \u6211\u4ee5\u524d\u64b8\u7684\u7ba1\u7406\u754c\u9762\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>walsh<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:44:23\t<\/p>\n<h3><\/h3>\n<p>  \t\tqfdk \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:42<br \/>  \u4e07\u4e00\u641e\u4e0d\u597d \u4f1a\u88abrm -rf\u7684\u3002 \u8bdd\u8bf4\u8fd9\u6837\u7684\u5c0f\u9e21 \u8981\u662f\u91cd\u542f\u4e86\u6709\u65f6\u5019\u4f1a\u6389<\/p>\n<p> \u5728restart policy\u91cc\u9762\u8bbe\u7f6e\u6210unless stopped\u5c31\u80fd\u5f00\u673a\u81ea\u52a8\u542f\u52a8\u5c0f\u9e21\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u544a\u8f9e<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 17:52:05\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6211\u5c31\u7ecf\u5e38\u62c9\u5b98\u65b9\u7684debian\u6216\u8005centos\uff0c\u8fdb\u5bb9\u5668\u91cc\u9762\u88c5\u670d\u52a1\u3002\u3002\u5f69\u7b14\u7684\u7b28\u529e\u6cd5:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ktaog6<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 19:15:41\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9ed1\u4e94\u6280\u672f\u8d34\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>flyqie<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-5 20:10:00\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u989d\u3002\u3002\u3002\u3002\u611f\u89c9\u8981\u662f\u641e\u7684\u8bdd\u53ef\u4ee5\u4f7f\u7528lxc\u6216\u8005ovz\u865a\u62df\u5316~docker\u611f\u89c9\u4f3c\u4e4e\u662f\u592a\u9002\u5408\u5462\uff0c\u4e0d\u8fc7\u611f\u8c22\u697c\u4e3b\u5206\u4eabyc010t\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>walsh \u5927\u4f6c\u6709\u8bdd\u8bf4 : 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/38006"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38006"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/38006\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38006"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}