{"id":127668,"date":"2018-11-19T09:40:46","date_gmt":"2018-11-19T01:40:46","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=127668"},"modified":"2018-11-12T09:41:19","modified_gmt":"2018-11-12T01:41:19","slug":"docker-wormhole","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/docker-wormhole.html","title":{"rendered":"\u901a\u8fc7Docker\u5bb9\u5668\u8fde\u63a5\u4ee3\u7406Wormhole"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nWormhole \u662f\u4e00\u4e2a\u80fd\u8bc6\u522b\u547d\u540d\u7a7a\u95f4\u7684\u7531 Socket \u6fc0\u6d3b\u7684\u96a7\u9053\u4ee3\u7406\u3002\u53ef\u4ee5\u8ba9\u4f60\u5b89\u5168\u7684\u8fde\u63a5\u5728\u4e0d\u540c\u7269\u7406\u673a\u5668\u4e0a\u7684 Docker \u5bb9\u5668\u3002\u53ef\u4ee5\u7528\u6765\u5b8c\u6210\u4e00\u4e9b\u6709\u8da3\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u8fde\u63a5\u8fd0\u884c\u5728\u5bb9\u5668\u672c\u673a\u7684\u670d\u52a1\u6216\u8005\u5728\u8fde\u63a5\u540e\u521b\u5efa\u6309\u9700\u7684\u670d\u52a1\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u8fde\u5230\u5bb9\u5668\u4e2d\u7684 MySQL \u670d\u52a1<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\u8fde\u63a5\u65b9\u6cd5\uff1a<\/p>\n

\r\nmysql=`docker run -d wormhole\/mysql`\r\n.\/wormhole create url :3306 docker-ns tail docker-ns $mysql\r\nmysql -u root -h 127.0.0.1\r\n\r\n<\/pre>\n
\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u7684 WordPress \u5bb9\u5668\u5230 MySQL \u5bb9\u5668<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\r\napp=`docker run -d wormhole\/wordpress`\r\nmysql=`docker run -d wormhole\/mysql`\r\n.\/wormhole create url :3306 docker-ns $app tail docker-ns $mysql\r\n<\/pre>\n
\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u7aef\u53e3\u6765\u8fde\u63a5<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\r\n.\/wormhole create url :80 trigger docker-run wormhole\/wordpress \\\r\n           child url :3306 trigger docker-run wormhole\/mysql\r\n<\/pre>\n
\u521b\u5efa\u4e00\u4e2a\u672c\u5730\u7aef\u53e3\u5230\u8fdc\u7a0b MySQL \u670d\u52a1<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\r\nmysql=`docker -H myserver run -d wormhole\/mysql`\r\n.\/wormhole create url :3306 remote myserver tail docker-ns $mysql\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u8fde\u63a5\u65b9\u6cd5\uff1a mysql=`docker run -d wormhole\/mysql` .\/wormhole c […]<\/p>\n","protected":false},"author":668,"featured_media":79611,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-127668","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/127668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=127668"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/127668\/revisions"}],"predecessor-version":[{"id":127805,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/127668\/revisions\/127805"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/79611"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=127668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=127668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=127668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}