2. \u83b7\u5f97\u5bf9\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u76ee\u5f55\u7684\u63a7\u5236<\/strong><\/span><\/div>\nDocker \u5377\u662f\u4e00\u9879\u529f\u80fd\u5f3a\u5927\u7684\u670d\u52a1\uff0c\u5141\u8bb8\u60a8\u901a\u8fc7\u5c06\u5bb9\u5668\u6570\u636e\u5199\u5165\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u7684\u6307\u5b9a\u6587\u4ef6\u5939\u6765\u5171\u4eab\u548c\u4fdd\u7559\u5bb9\u5668\u6570\u636e\u3002<\/p>\n
\u5728\u6ca1\u6709 sudo \u7684\u60c5\u51b5\u4e0b\u8fd0\u884c Docker \u5e26\u6765\u7684\u6700\u5927\u5a01\u80c1\u4e4b\u4e00\u662f\u7cfb\u7edf\u4e0a\u7684\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u63a7\u5236\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u7684\u76ee\u5f55\uff0c\u5305\u62ec\u6839\u76ee\u5f55\u3002<\/p>\n
\u60a8\u6240\u8981\u505a\u7684\u5c31\u662f\u8fd0\u884c Linux Docker \u6620\u50cf\uff0c\u4f8b\u5982 Ubuntu \u6620\u50cf\uff0c\u5e76\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5176\u6302\u8f7d\u5230\u6839\u6587\u4ef6\u5939\u4e0a\uff1a<\/p>\n
root@linuxmi:\/home\/linuxmi\/www.linuxmi.com# docker run -ti -v \/:\/hostproot ubuntu bash\r\n<\/pre>\n\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n
Unable to find image 'ubuntu:latest' locally\r\nlatest: Pulling from library\/ubuntu\r\n6e3729cf69e0: Pull complete \r\nDigest: sha256:27cb6e6ccef575a4698b66f5de06c7ecd61589132d5a91d098f7f3f9285415a9\r\nStatus: Downloaded newer image for ubuntu:latest\r\n<\/pre>\n\u7531\u4e8e Linux Docker \u5bb9\u5668\u4ee5 root \u7528\u6237\u8eab\u4efd\u8fd0\u884c\uff0c\u56e0\u6b64\u672c\u8d28\u4e0a\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u8bbf\u95ee\u6574\u4e2a\u6839\u6587\u4ef6\u5939\u3002<\/p>\n
\u4e0a\u8ff0\u547d\u4ee4\u5c06\u4e0b\u8f7d\u5e76\u8fd0\u884c\u6700\u65b0\u7684 Ubuntu \u6620\u50cf\u5e76\u5c06\u5176\u6302\u8f7d\u5230\u6839\u76ee\u5f55\u4e0a\u3002<\/p>\n
\u5728 Docker \u5bb9\u5668\u7ec8\u7aef\u4e0a\uff0c\u4f7f\u7528 cd \u547d\u4ee4\u8f6c\u5230 \/hostproot \u76ee\u5f55\uff1a<\/p>\n
root@c977c6de6265:\/# cd \/hostproot\r\n<\/pre>\n\u4f7f\u7528 ls \u547d\u4ee4\u5217\u51fa\u6b64\u76ee\u5f55\u7684\u5185\u5bb9\u5c06\u663e\u793a\u5bb9\u5668\u4e2d\u73b0\u5728\u53ef\u7528\u7684\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6240\u6709\u6587\u4ef6\u3002\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u64cd\u4f5c\u6587\u4ef6\uff0c\u67e5\u770b\u673a\u5bc6\u6587\u4ef6\uff0c\u9690\u85cf\u548c\u53d6\u6d88\u9690\u85cf\u6587\u4ef6\uff0c\u66f4\u6539\u6743\u9650\u7b49\u3002<\/p>\n
3. \u5b89\u88c5\u6076\u610f\u8f6f\u4ef6<\/strong><\/span><\/div>\n\u7cbe\u5fc3\u5236\u4f5c\u7684 Docker \u6620\u50cf\u53ef\u4ee5\u5728\u540e\u53f0\u8fd0\u884c\u5e76\u64cd\u4f5c\u7cfb\u7edf\u6216\u6536\u96c6\u654f\u611f\u6570\u636e\u3002\u66f4\u7cdf\u7cd5\u7684\u662f\uff0c\u6076\u610f\u7528\u6237\u53ef\u80fd\u4f1a\u901a\u8fc7 Docker \u5bb9\u5668\u5728\u60a8\u7684\u7f51\u7edc\u4e0a\u4f20\u64ad\u6076\u610f\u4ee3\u7801\u3002<\/p>\n
Docker \u5bb9\u5668\u6709\u51e0\u4e2a\u5b9e\u9645\u7528\u4f8b\uff0c\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u90fd\u4f1a\u5e26\u6765\u4e00\u7ec4\u4e0d\u540c\u7684\u5b89\u5168\u5a01\u80c1\u3002<\/p>\n
\u5728 Linux \u4e0a\u4fdd\u62a4\u60a8\u7684 Docker \u5bb9\u5668<\/strong><\/div>\nDocker\u662f\u4e00\u4e2a\u5f3a\u5927\u800c\u5b89\u5168\u7684\u5e73\u53f0\u3002\u5728\u6ca1\u6709 sudo \u7684\u60c5\u51b5\u4e0b\u8fd0\u884c Docker \u4f1a\u589e\u52a0\u60a8\u7684\u653b\u51fb\u9762\u5e76\u4f7f\u60a8\u7684\u7cfb\u7edf\u5bb9\u6613\u53d7\u5230\u653b\u51fb\u3002\u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u5f3a\u70c8\u5efa\u8bae\u60a8\u5c06 sudo \u4e0e Docker \u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n
\u7531\u4e8e\u7cfb\u7edf\u4e0a\u6709\u5982\u6b64\u591a\u7684\u7528\u6237\uff0c\u56e0\u6b64\u5f88\u96be\u4e3a\u6bcf\u4e2a\u7528\u6237\u5206\u914d\u6743\u9650\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u9075\u5faa\u6700\u4f73\u8bbf\u95ee\u63a7\u5236\u5b9e\u8df5\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7ef4\u62a4\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
Docker \u662f\u5f00\u53d1\u4eba\u5458\u7684\u5b89\u5168\u5bb9\u5668\u5316\u5e73\u53f0\u3002\u65e2\u7136\u5b83\u5982\u6b64\u5b89\u5168\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u5728\u6ca1\u6709\u8d85\u7ea7\u7528\u6237\u6743\u9650\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u5b83\uff1f Doc […]<\/p>\n","protected":false},"author":370,"featured_media":110911,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-259645","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\/259645","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\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=259645"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/259645\/revisions"}],"predecessor-version":[{"id":259757,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/259645\/revisions\/259757"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/110911"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=259645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=259645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=259645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}