{"id":3419,"date":"2023-09-10T11:13:05","date_gmt":"2023-09-10T03:13:05","guid":{"rendered":"http:\/\/www.yuguoxy.com\/geekhome\/?p=3419"},"modified":"2026-08-18T12:35:36","modified_gmt":"2026-08-18T04:35:36","slug":"docker-%e7%ae%80%e4%bb%8b%e5%92%8c%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=3419","title":{"rendered":"Docker \u7b80\u4ecb\u548c\u5b89\u88c5"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">Docker<\/strong> \u662f\u5e94\u7528\u6253\u5305\u3001\u5206\u53d1\u3001\u90e8\u7f72\u5de5\u5177\uff0c\u53ef\u770b\u6210\u53ea\u865a\u62df\u9879\u76ee\u8fd0\u884c\u73af\u5883\u7684\u8f7b\u91cf\u865a\u62df\u673a\u3002\u672c\u7bc7\u8bb2\u6982\u5ff5\uff08\u955c\u50cf \/ \u5bb9\u5668\uff09\u3001\u684c\u9762\u7248\u4e0e\u670d\u52a1\u5668\u7248\u5b89\u88c5\u3001Windows \u5f00 WSL2\uff0c\u4ee5\u53ca\u955c\u50cf\u52a0\u901f\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u7cfb\u5217\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>1. <a title=\"\u8be6\u7ec6\u9605\u8bfb Wsl2\u5b89\u88c5CentOS7\" href=\"https:\/\/ai.zhousir.top\/archives\/3430\">Wsl2\u5b89\u88c5CentOS7<\/a><\/section>\n<\/li>\n<li>\n<section>2. <a title=\"\u8be6\u7ec6\u9605\u8bfb Docker \u7b80\u4ecb\u548c\u5b89\u88c5\" href=\"https:\/\/ai.zhousir.top\/archives\/3419\">Docker \u7b80\u4ecb\u548c\u5b89\u88c5<\/a><\/section>\n<\/li>\n<li>\n<section>3. <a title=\"\u8be6\u7ec6\u9605\u8bfb Docker \u5feb\u901f\u5b89\u88c5\u8f6f\u4ef6\" href=\"https:\/\/ai.zhousir.top\/archives\/3434\">Docker \u5feb\u901f\u5b89\u88c5\u8f6f\u4ef6<\/a><\/section>\n<\/li>\n<li>\n<section>4. <a title=\"\u8be6\u7ec6\u9605\u8bfb \u5236\u4f5c\u81ea\u5df1\u7684\u955c\u50cf\" href=\"https:\/\/ai.zhousir.top\/archives\/3447\">\u5236\u4f5c\u81ea\u5df1\u7684\u955c\u50cf<\/a><\/section>\n<\/li>\n<li>\n<section>5. <a title=\"\u8be6\u7ec6\u9605\u8bfb Docker-Compose\u53d1\u5e03\u4e0e\u90e8\u7f72\" href=\"https:\/\/ai.zhousir.top\/archives\/3450\">Docker-Compose\u53d1\u5e03\u4e0e\u90e8\u7f72<\/a><\/section>\n<\/li>\n<\/ul>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e00\u3001Docker \u662f\u4ec0\u4e48<\/h2>\n<p style=\"margin: 1em 0px;\">Docker \u628a\u4f9d\u8d56\u3001\u7b2c\u4e09\u65b9\u5e93\u548c\u8f6f\u4ef6\u6253\u6210\u5b89\u88c5\u5305\uff0c\u65b9\u4fbf\u4f20\u5230\u955c\u50cf\u4ed3\u5e93\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u80fd\u5728 Windows \/ Mac \/ Linux \u8dd1\u51fa\u540c\u6837\u73af\u5883\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695901390733.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3421\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695901390733.png\" alt=\"1695901390733\" width=\"560\" height=\"189\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695901390733.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695901390733.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u6253\u5305\u3001\u5206\u53d1\u3001\u90e8\u7f72<\/h3>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><strong style=\"color: #4870ac;\">\u6253\u5305<\/strong>\uff1a\u8fd0\u884c\u6240\u9700\u4f9d\u8d56\u3001\u5e93\u3001\u8f6f\u4ef6\u6253\u5230\u4e00\u8d77\uff0c\u53d8\u6210\u5b89\u88c5\u5305<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">\u5206\u53d1<\/strong>\uff1a\u628a\u5b89\u88c5\u5305\u4f20\u5230\u955c\u50cf\u4ed3\u5e93\uff0c\u522b\u4eba\u65b9\u4fbf\u83b7\u53d6<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">\u90e8\u7f72<\/strong>\uff1a\u62ff\u5b89\u88c5\u5305\u4e00\u6761\u547d\u4ee4\u8dd1\u8d77\u6765\uff0c\u73af\u5883\u4e00\u81f4<\/section>\n<\/li>\n<\/ul>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u76f8\u5bf9\u4f20\u7edf\u90e8\u7f72\u7684\u4f18\u52bf<\/h3>\n<p style=\"margin: 1em 0px;\">\u5e38\u89c4\uff1aWindows \u5f00\u53d1\u6d4b\u8bd5 \u2192 Linux \u670d\u52a1\u5668\u81ea\u5df1\u914d\u73af\u5883\u3002\u5e38\u89c1\u62b1\u6028\u662f\u300c\u6211\u673a\u5668\u4e0a\u597d\u597d\u7684\uff0c\u670d\u52a1\u5668\u5c31\u5404\u79cd\u95ee\u9898\u300d\u3002<\/p>\n<p style=\"margin: 1em 0px;\">Docker\uff1a\u5f00\u53d1\u6d4b\u8bd5 \u2192 \u6253\u6210\u955c\u50cf \u2192 \u5404\u670d\u52a1\u5668\u4e00\u6761\u547d\u4ee4\u90e8\u7f72\uff0c\u73af\u5883\u4e00\u81f4\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u955c\u50cf\u4e0e\u5bb9\u5668<\/h3>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><strong style=\"color: #4870ac;\">\u955c\u50cf<\/strong>\uff1a\u5b89\u88c5\u5305\uff0c\u65b9\u4fbf\u4f20\u64ad\u5b89\u88c5<\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">\u5bb9\u5668<\/strong>\uff1a\u88c5\u597d\u540e\u7684\u8fd0\u884c\u6001\uff0c\u73af\u5883\u72ec\u7acb\u9694\u79bb<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695903422970.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3422\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695903422970.png\" alt=\"1695903422970\" width=\"749\" height=\"409\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695903422970.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695903422970.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<p style=\"margin: 1em 0px;\"><a spellcheck=\"false\" href=\"https:\/\/www.docker.org.cn\/index.html\">\u4e2d\u6587\u793e\u533a<\/a> \u00b7 <a spellcheck=\"false\" href=\"https:\/\/www.bilibili.com\/video\/BV1HP4118797\/?p=1&amp;vd_source=7b80eab05361907871761766ced7ace3\">\u89c6\u9891<\/a><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e8c\u3001\u5b89\u88c5\u6e20\u9053<\/h2>\n<p style=\"margin: 1em 0px;\">\u684c\u9762\u7248\uff1a<a href=\"https:\/\/www.docker.com\/products\/docker-desktop\">https:\/\/www.docker.com\/products\/docker-desktop<\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u670d\u52a1\u5668\u7248\uff1a<a href=\"https:\/\/docs.docker.com\/engine\/install\/#server\">https:\/\/docs.docker.com\/engine\/install\/#server<\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u6709\u56fe\u5f62\u754c\u9762\u7684 macOS \/ Windows \/ Linux \u7528 Docker Desktop\uff1b\u65e0\u56fe\u5f62\u7684\u516c\u53f8 CentOS\u3001\u4e91\u4e3b\u673a\u7528 Docker Engine\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e09\u3001\u684c\u9762\u7248\u5b89\u88c5\uff08Windows 11 + WSL2\uff09<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">1. \u5f00\u542f\u865a\u62df\u5316\u4e0e Linux \u5b50\u7cfb\u7edf<\/h3>\n<p style=\"margin: 1em 0px;\">\u63a7\u5236\u9762\u677f \u2192 \u7a0b\u5e8f \u2192 \u542f\u7528\u6216\u5173\u95ed Windows \u529f\u80fd\uff0c\u6253\u5f00 Windows \u865a\u62df\u5316\u548c Linux \u5b50\u7cfb\u7edf\uff08WSL2\uff09\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902242225.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3423\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902242225.png\" alt=\"1695902242225\" width=\"675\" height=\"464\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695902242225.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695902242225.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">2. \u66f4\u65b0 WSL2<\/h3>\n<p style=\"margin: 1em 0px;\">\u5efa\u8bae\u66f4\u65b0\u5230\u6700\u65b0\uff0c\u5426\u5219\u88c5\u684c\u9762\u7248\u4f1a\u63d0\u793a\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a spellcheck=\"false\" href=\"https:\/\/www.aliyundrive.com\/s\/h2aHcTDLTpV\">\u70b9\u51fb\u4e0b\u8f7dwsl_update_x64.msi<\/a><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">3. \u5b89\u88c5 CentOS7 \u53d1\u884c\u7248<\/h3>\n<p style=\"margin: 1em 0px;\">\u88c5 WSL2 \u672c\u8d28\u662f\u542f\u7528 Hyper-V \u6838\u5fc3\u548c\u5fae\u8f6f\u5b9a\u5236 Linux \u5185\u6838\u3001boot \u6587\u4ef6\u7cfb\u7edf\uff1b\u518d\u5728 WSL2 \u4e0a\u88c5 CentOS7\/Ubuntu\uff0c\u672c\u8d28\u662f\u4e0b\u8f7d\u8be5\u53d1\u884c\u7248\u7684\u6839\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/www.cnblogs.com\/xysgo\/p\/16883568.html\">https:\/\/www.cnblogs.com\/xysgo\/p\/16883568.html<\/a><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">4. \u5f00\u673a\u542f\u52a8 Hypervisor<\/h3>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">bcdedit \/set hypervisorlaunchtype auto<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u6ce8\u610f\u7528\u7ba1\u7406\u5458\u6743\u9650\u6253\u5f00 PowerShell\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">5. \u9ed8\u8ba4\u7248\u672c 2<\/h3>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">wsl.exe --set-default-version 2<\/code><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">6. \u68c0\u67e5\u662f\u5426\u6b63\u786e<\/h3>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">wsl.exe --list --verbose<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u5e94\u80fd\u770b\u5230\u4e00\u4e2a Linux \u53d1\u884c\u7248\uff08\u540d\u5b57\u56e0\u5b89\u88c5\u800c\u5f02\uff09\uff0c\u4e14 VERSION \u4e3a 2\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u5b89\u88c5 Docker Desktop<\/h3>\n<p style=\"margin: 1em 0px;\"><a spellcheck=\"false\" href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\">\u5b98\u7f51\u4e0b\u8f7d<\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902688809.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3424\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902688809.png\" alt=\"1695902688809\" width=\"711\" height=\"321\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695902688809.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695902688809.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<p style=\"margin: 1em 0px;\"><a spellcheck=\"false\" href=\"https:\/\/www.aliyundrive.com\/s\/dEoVbuUuScB\">\u4e91\u76d8\u4e0b\u8f7d<\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902880364.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3425\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695902880364.png\" alt=\"1695902880364\" width=\"782\" height=\"445\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695902880364.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695902880364.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u955c\u50cf\u52a0\u901f\u6e90<\/h3>\n<table style=\"display: table; text-align: left; overflow: auto; border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; overflow-wrap: break-word; word-break: break-all;\" width=\"800\">\n<thead>\n<tr>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u955c\u50cf\u52a0\u901f\u5668<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u5730\u5740<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Docker \u4e2d\u56fd\u5b98\u65b9\u955c\u50cf<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/registry.docker-cn.com\">https:\/\/registry.docker-cn.com<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">DaoCloud \u955c\u50cf\u7ad9<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"http:\/\/f1361db2.m.daocloud.io\">http:\/\/f1361db2.m.daocloud.io<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Azure \u4e2d\u56fd\u955c\u50cf<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/dockerhub.azk8s.cn\">https:\/\/dockerhub.azk8s.cn<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u79d1\u5927\u955c\u50cf\u7ad9<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/docker.mirrors.ustc.edu.cn\">https:\/\/docker.mirrors.ustc.edu.cn<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u963f\u91cc\u4e91<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/ud6340vz.mirror.aliyuncs.com\">https:\/\/ud6340vz.mirror.aliyuncs.com<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e03\u725b\u4e91<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/reg-mirror.qiniu.com\">https:\/\/reg-mirror.qiniu.com<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u7f51\u6613\u4e91<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/hub-mirror.c.163.com\">https:\/\/hub-mirror.c.163.com<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u817e\u8baf\u4e91<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\"><a href=\"https:\/\/mirror.ccs.tencentyun.com\">https:\/\/mirror.ccs.tencentyun.com<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">\"registry-mirrors\": [\"https:\/\/registry.docker-cn.com\"]<\/code><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695905511255.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3426\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2023\/10\/1695905511255.png\" alt=\"1695905511255\" width=\"748\" height=\"401\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><span class=\"md-image md-img-loaded\" contenteditable=\"false\" data-src=\".\/media\/1695905511255.png\"><img decoding=\"async\" src=\"file:\/\/D:\/course\/docker\/media\/1695905511255.png?lastModify=1696907597\" alt=\"\" data-local-refresh=\"true\" \/><\/span><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u56db\u3001\u670d\u52a1\u5668\u7248\u5b89\u88c5\uff08CentOS yum\uff09<\/h2>\n<p style=\"margin: 1em 0px;\">CentOS \u4e2d\u7528 yum \u5b89\u88c5 Docker \/ Docker-compose\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">1. \u5378\u8f7d\u65e7\u7248<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">yum remove -y  docker \\\n  docker-client \\\n  docker-client-latest \\\n  docker-common \\\n  docker-latest \\\n  docker-latest-logrotate \\\n  docker-logrotate \\\n  docker-engine<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">2. \u914d\u7f6e\u7a33\u5b9a\u4ed3\u5e93<\/h3>\n<p style=\"margin: 1em 0px;\">\u65b0\u4e3b\u673a\u9996\u6b21\u5b89\u88c5 Docker Engine \u524d\uff0c\u8981\u8bbe\u7f6e Docker \u7a33\u5b9a\u5b58\u50a8\u5e93\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">sudo yum install -y yum-utils\nsudo yum-config-manager \\\n \u00a0  --add-repo \\\n \u00a0  https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">3. \u5b89\u88c5 Engine \u4e0e containerd<\/h3>\n<p style=\"margin: 1em 0px;\">Docker CE \u9002\u5408\u60f3\u5165\u95e8\u5bb9\u5668\u7684\u5f00\u53d1\u8005\u548c\u5c0f\u56e2\u961f\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">sudo yum install docker-ce docker-ce-cli containerd.io docker-compose<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u6307\u5b9a\u7248\u672c\u5148\u5217\u51fa\u518d\u88c5\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">yum list docker-ce --showduplicates | sort -r<\/code><\/p>\n<p style=\"margin: 1em 0px;\">docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable<\/p>\n<p style=\"margin: 1em 0px;\">\u5f53\u524d\u4f7f\u7528\u7248\u672c\u793a\u4f8b\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">sudo yum install -y docker-ce-19.03.15 docker-ce-cli-19.03.15 containerd.io docker-compose<\/code><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">4. \u66f4\u65b0\u901a\u9053<\/h3>\n<p style=\"margin: 1em 0px;\">Docker CE \u6709\u7a33\u5b9a\u3001\u6d4b\u8bd5\u3001\u591c\u95f4\u4e09\u4e2a\u901a\u9053\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">yum -y upgrade docker-ce<\/code><\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">5. \u542f\u52a8<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">$ sudo systemctl enable docker\n\n$ sudo systemctl start docker<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">6. \u67e5\u770b\u72b6\u6001<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">$ docker version\nClient:\n Version: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 18.09.5\n API version: \u00a0 \u00a0 \u00a0 1.39\n Go version: \u00a0 \u00a0 \u00a0  go1.10.8\n Git commit: \u00a0 \u00a0 \u00a0  e8ff056\n Built: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Thu Apr 11 04:43:34 2019\n OS\/Arch: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 linux\/amd64<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">7. \u79fb\u9664<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">$ sudo yum remove docker-ce\n\n$ sudo rm -rf \/var\/lib\/docker<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">8. \u7528 hello-world \u9a8c\u8bc1<\/h3>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">docker pull hello-world\n\ndocker images\n\ndocker run hello-world<\/code><\/pre>\n<blockquote style=\"display: block; font-size: 0.9em; border-left: 3px solid #4870ac; padding: 0.5em 1em; margin: 0px; background: #f6f8fa; color: #40464f;\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1aDocker \u7528\u955c\u50cf\u5f53\u5b89\u88c5\u5305\u3001\u5bb9\u5668\u5f53\u9694\u79bb\u8fd0\u884c\u6001\uff1b\u684c\u9762\u73af\u5883\u8d70 Desktop + WSL2\uff0c\u670d\u52a1\u5668\u7528 Engine\uff0c\u914d\u597d\u52a0\u901f\u6e90\u518d\u8dd1 hello-world \u9a8c\u5b89\u88c5\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Docker \u662f\u5e94\u7528\u6253\u5305\u3001\u5206\u53d1\u3001\u90e8\u7f72\u5de5\u5177\uff0c\u53ef\u770b\u6210\u53ea\u865a\u62df\u9879\u76ee\u8fd0\u884c\u73af\u5883\u7684\u8f7b\u91cf\u865a\u62df\u673a\u3002\u672c\u7bc7\u8bb2\u6982\u5ff5\uff08\u955c\u50cf \/ \u5bb9\u5668\uff09\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[105],"tags":[159],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3419"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3419"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3419\/revisions"}],"predecessor-version":[{"id":3455,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3419\/revisions\/3455"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}