{"id":16111,"date":"2016-04-06T09:23:51","date_gmt":"2016-04-06T01:23:51","guid":{"rendered":"http:\/\/vmcloud.info\/?p=16111"},"modified":"2016-04-06T09:23:51","modified_gmt":"2016-04-06T01:23:51","slug":"%e3%80%90vmcloud%e4%ba%91%e5%b9%b3%e5%8f%b0%e3%80%91%e6%8b%a5%e6%8a%b1docker%ef%bc%88%e4%b8%89%ef%bc%89%e9%85%8d%e7%bd%ae%e5%a4%9a%e4%b8%aa%e5%ae%b9%e5%99%a8","status":"publish","type":"post","link":"https:\/\/vmcloud.info\/?p=16111","title":{"rendered":"\u3010VMCloud\u4e91\u5e73\u53f0\u3011\u62e5\u62b1Docker\uff08\u4e09\uff09\u914d\u7f6e\u591a\u4e2a\u5bb9\u5668"},"content":{"rendered":"<p>Docker\u65e2\u7136\u662f\u4e00\u4e2aLXC\u7684\u6280\u672f\uff0c\u90a3\u4e48\u5fc5\u7136\u53ef\u4ee5\u8fd0\u884c\u591a\u4e2a\u5bb9\u5668\uff0c\u4e0a\u6b21\u6211\u4eec\u5728Dokcer\u91cc\u914d\u7f6e\u4e86\u7b2c\u4e00\u4e2a\u5bb9\u5668\u5e76\u4e14\u5b9e\u73b0\u4e86Wordpress+Mysql\u7ad9\u70b9\uff0c\u8fd9\u4e00\u6b21\uff0c\u6211\u4eec\u6765\u5c1d\u8bd5\u4e0b\uff0c\u5728\u540c\u4e00\u4e2aDocker\u4e3b\u673a\u4e0a\u521b\u5efa\u4e24\u4e2a\u5bb9\u5668\u3002  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image002.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image002\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto\" border=\"0\" alt=\"clip_image002\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image002_thumb.jpg\" width=\"549\" height=\"407\"><\/a>  <\/p>\n<p>1\u3001\u9996\u5148\uff0c\u6211\u4eec\u5148\u8981\u8fbe\u5230\u7684\u6548\u679c\u600e\u4e48\u6837\u7684\uff0c\u5927\u6982\u662f\u8fd9\u6837\u7684\uff1a  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image003.png\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image003\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image003\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image003_thumb.png\" width=\"339\" height=\"383\"><\/a>  <\/p>\n<p>2\u3001\u6240\u4ee5\u6211\u4eec\u5f97\u5229\u7528\u524d\u9762\u51e0\u7ae0\u7684\u77e5\u8bc6\u6765\u6574\u5408\u505a\u8fd9\u4e48\u4e00\u4e2a\u5b9e\u9a8c\uff0c\u9996\u5148\u6211\u4eec\u9700\u8981pull\u4e0bcontainer\u7684OS\uff0c\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528jdeathe\/centos-ssh-apache-php\u7684Image\uff08\u56e0\u4e3a\u4e0a\u9762\u5df2\u7ecf\u4e3a\u6211\u4eec\u642d\u5efa\u597d\u4e86apache+php\u4e86\uff09\uff1a  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image005.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image005\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image005\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image005_thumb.jpg\" width=\"557\" height=\"79\"><\/a>  <\/p>\n<p>3\u3001\u63a5\u7740\uff0c\u6211\u4eec\u4f7f\u7528\u4ee5\u4e0b\u8bed\u53e5\u6765\u521b\u5efa\u4e24\u4e2aContainer\uff1a  <\/p>\n<p><b>docker run -itd &#8211;name=app01 -p 8081:80 jdeathe\/centos-ssh-apache-php<\/b>  <\/p>\n<p><b>docker run -itd &#8211;name=app02 -p 8082:80 jdeathe\/centos-ssh-apache-php<\/b>  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image007.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image007\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image007\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image007_thumb.jpg\" width=\"557\" height=\"74\"><\/a>  <\/p>\n<p>4\u3001\u63a5\u7740\u6211\u4eec\u67e5\u770b\u4e0b\u72b6\u6001\uff1a  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image009.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image009\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image009\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image009_thumb.jpg\" width=\"559\" height=\"71\"><\/a>  <\/p>\n<p>5\u3001\u4e3a\u4e86\u80fd\u591f\u533a\u520601\u4e0e02\uff0c\u6211\u4eec\u8fdb\u5165\u5bb9\u5668\u5185\u4fee\u6539\u4e0b\u4e3b\u9875\u6587\u4ef6\uff1a  <\/p>\n<p>docker exec -ti app01 \/bin\/bash  <\/p>\n<p>docker exec -ti app02 \/bin\/bash  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image011.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image011\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image011\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image011_thumb.jpg\" width=\"558\" height=\"104\"><\/a>  <\/p>\n<p>\u540c\u6837\u7684\uff0c\u5728App02\u4e0a\u4e5f\u8fd9\u4e48\u505a\uff0c\u63a5\u7740\uff0c\u6211\u4eec\u8bbf\u95ee\u4e0b\uff0c\u770b\u662f\u5426\u751f\u6548\uff1a  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image013.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image013\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image013\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image013_thumb.jpg\" width=\"557\" height=\"167\"><\/a>  <\/p>\n<p>\u8bbf\u95eeApp02\uff1a  <\/p>\n<p><a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image015.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image015\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"clip_image015\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/clip_image015_thumb.jpg\" width=\"557\" height=\"149\"><\/a>  <\/p>\n<p>6\u3001\u81f3\u6b64\uff0c\u6211\u4eec\u5c31\u6210\u529f\u5229\u7528Docker\u5728\u4e00\u53f0\u673a\u5b50\u4e0a\u521b\u5efa\u4e86\u4e24\u4e2aApache Container  <\/p>\n<hr>\n<p> <a href=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/logo.png\"><img loading=\"lazy\" decoding=\"async\" title=\"logo\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto\" border=\"0\" alt=\"logo\" src=\"https:\/\/vmcloud.info\/wp-content\/uploads\/2016\/04\/logo_thumb.png\" width=\"533\" height=\"347\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker\u65e2\u7136\u662f\u4e00\u4e2aLXC\u7684\u6280\u672f\uff0c\u90a3\u4e48\u5fc5\u7136\u53ef\u4ee5\u8fd0\u884c\u591a\u4e2a\u5bb9\u5668\uff0c\u4e0a\u6b21\u6211\u4eec\u5728Dokcer\u91cc\u914d\u7f6e\u4e86\u7b2c\u4e00\u4e2a\u5bb9\u5668\u5e76\u4e14\u5b9e\u73b0\u4e86Wordpress+Mysql\u7ad9\u70b9\uff0c\u8fd9\u4e00\u6b21\uff0c\u6211\u4eec\u6765\u5c1d\u8bd5\u4e0b\uff0c\u5728\u540c\u4e00\u4e2aDocker\u4e3b\u673a\u4e0a\u521b\u5efa\u4e24\u4e2a\u5bb9\u5668\u3002 1\u3001\u9996\u5148\uff0c\u6211\u4eec\u5148\u8981\u8fbe\u5230\u7684\u6548\u679c\u600e\u4e48\u6837\u7684\uff0c\u5927\u6982\u662f\u8fd9\u6837\u7684\uff1a 2\u3001\u6240\u4ee5\u6211\u4eec\u5f97\u5229\u7528\u524d\u9762\u51e0\u7ae0\u7684\u77e5\u8bc6\u6765\u6574\u5408\u505a\u8fd9\u4e48\u4e00\u4e2a\u5b9e\u9a8c\uff0c\u9996\u5148\u6211\u4eec\u9700\u8981pull\u2026\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[231],"tags":[],"class_list":["post-16111","post","type-post","status-publish","format-standard","hentry","category-231"],"_links":{"self":[{"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/posts\/16111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vmcloud.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16111"}],"version-history":[{"count":1,"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/posts\/16111\/revisions"}],"predecessor-version":[{"id":16121,"href":"https:\/\/vmcloud.info\/index.php?rest_route=\/wp\/v2\/posts\/16111\/revisions\/16121"}],"wp:attachment":[{"href":"https:\/\/vmcloud.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmcloud.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmcloud.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}