{"id":276937,"date":"2023-07-08T20:04:39","date_gmt":"2023-07-08T12:04:39","guid":{"rendered":"https:\/\/lrxjmw.cn\/sazdjjgxsqsa.html"},"modified":"2023-07-08T20:04:39","modified_gmt":"2023-07-08T12:04:39","slug":"sazdjjgxsqsa","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/sazdjjgxsqsa.html","title":{"rendered":"suse linux\u5b89\u88c5docker \u7b80\u6d01\u9ad8\u6548\uff01SUSELinux\u8f7b\u677e\u5b89\u88c5Docker"},"content":{"rendered":"

\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u5206\u4eab\u5982\u4f55\u5728SUSE Linux<\/a>\u7cfb\u7edf<\/a>\u4e0a\u5b89\u88c5<\/a>Docker\u7684\u7ecf\u9a8c\u3002Docker\u662f\u4e00\u79cd\u6d41\u884c\u7684\u5bb9\u5668\u5316\u5e73\u53f0\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u66f4\u8f7b\u677e\u5730\u6784\u5efa\u3001\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7\u672c\u6587\uff0c\u60a8\u5c06\u5b66\u5230\u5982\u4f55\u5728SUSE Linux\u4e0a\u5b89\u88c5Docker\uff0c\u5e76\u638c\u63e1\u4e00\u4e9b\u6709\u7528\u7684\u6280\u5de7\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n

1.\u51c6\u5907\u5de5\u4f5c<\/b><\/p>\n

\u5728\u5f00\u59cb\u5b89\u88c5Docker\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u51c6\u5907\u5de5\u4f5c\u3002\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u7684SUSE Linux\u7cfb\u7edf\u662f\u6700\u65b0\u7248\u672csuse linux\u5b89\u88c5docker<\/strong>\uff0c\u5e76\u4e14\u5177\u6709\u7ba1\u7406\u5458\u6743\u9650\u3002\u5176\u6b21\uff0c\u68c0\u67e5\u60a8\u7684\u7cfb\u7edf\u662f\u5426\u6ee1\u8db3Docker\u7684\u786c\u4ef6\u8981\u6c42\uff0c\u4f8b\u5982\u652f\u6301\u865a\u62df\u5316\u6280\u672f\u548c64\u4f4d\u64cd\u4f5c\u7cfb\u7edf\u3002\u6700\u540e\uff0c\u5907\u4efd\u60a8\u7684\u91cd\u8981\u6570\u636e\u4ee5\u9632\u4e07\u4e00\u3002<\/p>\n

2.\u66f4\u65b0\u7cfb\u7edf<\/b><\/p>\n

\u5728\u5b89\u88c5Docker\u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u66f4\u65b0\u60a8\u7684\u7cfb\u7edf\u3002\u6253\u5f00\u7ec8\u7aef\u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/a>\u6765\u66f4\u65b0\u8f6f\u4ef6\u5305\uff1a<\/p>\n

\n

\nsudo zypper update\n<\/pre>\n<\/p>\n

\u8fd9\u5c06\u66f4\u65b0\u60a8\u7684\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u5230\u6700\u65b0\u7248\u672c\u3002<\/p>\n

3.\u6dfb\u52a0Docker\u5b58\u50a8\u5e93<\/b><\/p>\n

\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u6dfb\u52a0Docker\u5b58\u50a8\u5e93\u5230SUSE Linux\u7cfb\u7edf\u4e2d\u3002\u6253\u5f00\u7ec8\u7aef\u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo zypper addrepo \n<\/pre>\n<\/p>\n

\u8fd9\u5c06\u6dfb\u52a0Docker\u5b98\u65b9\u5b58\u50a8\u5e93\u5230\u60a8\u7684\u7cfb\u7edf\u4e2d\u3002<\/p>\n

4.\u5b89\u88c5Docker<\/b><\/p>\n

\u6dfb\u52a0\u5b58\u50a8\u5e93\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5f00\u59cb\u5b89\u88c5Docker\u4e86\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5Docker\uff1a<\/p>\n

\n

\nsudo zypper install docker-ce\n<\/pre>\n<\/p>\n

\u8fd9\u5c06\u4e0b\u8f7d\u5e76\u5b89\u88c5Docker\u7684\u6700\u65b0\u7248\u672c\u3002<\/p>\n

5.\u542f\u52a8Docker\u670d\u52a1<\/b><\/p>\n

\u5b89\u88c5\u5b8c\u6210\u540esuse linux\u5b89\u88c5docker<\/strong>\uff0c\u6211\u4eec\u9700\u8981\u542f\u52a8Docker\u670d\u52a1\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8Docker\uff1a<\/p>\n

\n

\nsudo systemctl start docker\n<\/pre>\n<\/p>\n

\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06Docker\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u542f\u52a8\uff1a<\/p>\n

\n

\nsudo systemctl enable docker\n<\/pre>\n<\/p>\n

\u73b0\u5728linux\u670d\u52a1\u5668\u7cfb\u7edf\uff0cDocker\u5df2\u6210\u529f\u5b89\u88c5\u5e76\u6b63\u5728\u8fd0\u884c\u3002<\/p>\n

6.\u9a8c\u8bc1\u5b89\u88c5<\/b><\/p>\n

\u4e3a\u4e86\u9a8c\u8bc1Docker\u662f\u5426\u6b63\u786e\u5b89\u88c5\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5Docker\u7248\u672c\uff1a<\/p>\n

\n

\ndocker --version\n<\/pre>\n<\/p>\n

\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u770b\u5230\u5b89\u88c5\u7684Docker\u7248\u672c\u4fe1\u606f\u3002<\/p>\n

7.\u914d\u7f6e\u7528\u6237\u6743\u9650<\/b><\/p>\n

\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709root\u7528\u6237\u548c\u7279\u5b9a\u7684\u7528\u6237\u7ec4\u624d\u80fd\u8bbf\u95ee\u548c\u4f7f\u7528Docker\u3002\u5982\u679c\u60a8\u5e0c\u671b\u5176\u4ed6\u7528\u6237\u4e5f\u80fd\u591f\u4f7f\u7528Docker\uff0c\u53ef\u4ee5\u5c06\u5176\u6dfb\u52a0\u5230docker\u7528\u6237\u7ec4\u4e2d\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5f53\u524d\u7528\u6237\u6dfb\u52a0\u5230docker\u7528\u6237\u7ec4\uff1a<\/p>\n

\n

\nsudo usermod -aG docker $USER\n<\/pre>\n<\/p>\n

\u8bf7\u6ce8\u610f\uff0c\u5728\u5c06\u7528\u6237\u6dfb\u52a0\u5230docker\u7528\u6237\u7ec4\u540e\uff0c\u60a8\u9700\u8981\u6ce8\u9500\u5e76\u91cd\u65b0\u767b\u5f55\u624d\u80fd\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n

8.\u4f7f\u7528Docker<\/b><\/p>\n

\u73b0\u5728suse linux \u4e0b\u8f7d\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5730\u5b89\u88c5\u4e86Docker\uff0c\u5e76\u4e14\u914d\u7f6e\u4e86\u9002\u5f53\u7684\u7528\u6237\u6743\u9650\u3002\u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u7b80\u8981\u4ecb\u7ecd\u4e00\u4e9b\u5e38\u7528\u7684Docker\u547d\u4ee4\u3002<\/p>\n

-`docker run`\uff1a\u8fd0\u884c\u4e00\u4e2a\u5bb9\u5668\u3002<\/p>\n

-`docker ps`\uff1a\u5217\u51fa\u6b63\u5728\u8fd0\u884c\u7684\u5bb9\u5668\u3002<\/p>\n

-`docker images`\uff1a\u5217\u51fa\u672c\u5730\u955c\u50cf\u3002<\/p>\n

-`docker pull`\uff1a\u4eceDocker\u4ed3\u5e93\u4e2d\u62c9\u53d6\u955c\u50cf\u3002<\/p>\n

-`docker build`\uff1a\u6784\u5efa\u4e00\u4e2a\u955c\u50cf\u3002<\/p>\n

-`docker stop`\uff1a\u505c\u6b62\u4e00\u4e2a\u6b63\u5728\u8fd0\u884c\u7684\u5bb9\u5668\u3002<\/p>\n

9.\u5378\u8f7dDocker<\/b><\/p>\n

\u5982\u679c\u60a8\u9700\u8981\u5378\u8f7dDocker\uff0c\u53ef\u4ee5\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo zypper remove docker-ce\n<\/pre>\n<\/p>\n

\u6b64\u547d\u4ee4\u5c06\u5220\u9664Docker\u53ca\u5176\u76f8\u5173\u7ec4\u4ef6\u3002<\/p>\n

\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u5b66\u4e60\u4e86\u5982\u4f55\u5728SUSE Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5Docker\uff0c\u5e76\u4e86\u89e3\u4e86\u4e00\u4e9b\u5e38\u7528\u7684Docker\u547d\u4ee4\u3002\u5e0c\u671b\u8fd9\u4e9b\u7ecf\u9a8c\u5206\u4eab\u5bf9\u60a8\u5728\u4f7f\u7528Docker\u65f6\u6709\u6240\u5e2e\u52a9\u3002\u795d\u60a8\u5728\u5bb9\u5668\u5316\u6280\u672f\u7684\u4e16\u754c\u4e2d\u63a2\u7d22\u6109\u5feb\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

Docker\u662f\u4e00\u79cd\u6d41\u884c\u7684\u5bb9\u5668\u5316\u5e73\u53f0\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u66f4\u8f7b\u677e\u5730\u6784\u5efa\u3001\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\u6253\u5f00\u7ec8\u7aef\u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0\u8f6f\u4ef6\u5305\uff1a\u8fd9\u5c06\u66f4\u65b0\u60a8\u7684\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u5230\u6700\u65b0\u7248\u672c\u3002dockerdocker\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5f53\u524d\u7528\u6237\u6dfb\u52a0\u5230docker\u7528\u6237\u7ec4\uff1a\u73b0\u5728\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5730\u5b89\u88c5\u4e86Docker\uff0c\u5e76\u4e14\u914d\u7f6e\u4e86\u9002\u5f53\u7684\u7528\u6237\u6743\u9650\u3002run`\uff1a\u8fd0\u884c\u4e00\u4e2a\u5bb9\u5668\u3002build`\uff1a\u6784\u5efa\u4e00\u4e2a\u955c\u50cf\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-276937","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/276937","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=276937"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/276937\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=276937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=276937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=276937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}