{"id":221,"date":"2026-10-25T12:07:48","date_gmt":"2026-10-25T04:07:48","guid":{"rendered":"http:\/\/laoke.pw\/?p=221"},"modified":"2026-10-25T12:07:48","modified_gmt":"2026-10-25T04:07:48","slug":"183-docker-desktop-%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae%e4%b8%80%e6%ac%a1%e5%88%b0%e4%bd%8d%ef%bc%8cwindows-%e4%b9%9f%e8%83%bd%e4%b8%9d%e6%bb%91%e8%b7%91%e5%ae%b9%e5%99%a8","status":"publish","type":"post","link":"https:\/\/laoke.pw\/?p=221","title":{"rendered":"183 Docker Desktop \u2014\u2014 \u73af\u5883\u914d\u7f6e\u4e00\u6b21\u5230\u4f4d\uff0cWindows \u4e5f\u80fd\u4e1d\u6ed1\u8dd1\u5bb9\u5668"},"content":{"rendered":"<p><strong>\u4e00\u53e5\u8bdd\u5b9a\u4f4d<\/strong>\uff1aDocker Desktop \u662f Docker \u5b98\u65b9\u63a8\u51fa\u7684\u684c\u9762\u7aef\u5bb9\u5668\u7ba1\u7406\u5de5\u5177\uff0c\u8ba9\u4f60\u5728 Windows \u4e0a\u7528\u56fe\u5f62\u754c\u9762 + \u4e00\u6761\u547d\u4ee4\u5c31\u628a\u5f00\u53d1\u73af\u5883\u8dd1\u8d77\u6765\u3002<\/p>\n<p><strong>\u75db\u70b9\u5206\u6790<\/strong>\uff1a\u5f88\u591a\u7528\u8fc7\u5b83\u7684\u4eba\u90fd\u6709\u7c7b\u4f3c\u7ecf\u5386\uff1a\u65b0\u9879\u76ee\u8981 MySQL 8\u3001Redis 7\u3001Node 20\uff0c\u624b\u52a8\u88c5\u4e00\u904d\u534a\u5c0f\u65f6\u8d77\u6b65\uff0c\u5378\u8f7d\u6b8b\u7559\u8fd8\u5f97\u518d\u6e05\u4e00\u8f6e\uff1b\u540c\u4e8b\u8bf4&quot;\u6211\u8fd9\u8fb9\u80fd\u8dd1&quot;\uff0c\u5230\u4f60\u673a\u5668\u4e0a\u5c31\u62a5\u7248\u672c\u4e0d\u517c\u5bb9\u3002\u73af\u5883\u4e0d\u4e00\u81f4\u662f\u5f00\u53d1\u91cc\u6700\u78e8\u4eba\u7684\u4e8b\uff0c\u800c\u5bb9\u5668\u6b63\u662f\u51b2\u7740\u8fd9\u4e2a\u95ee\u9898\u6765\u7684\u3002<\/p>\n<p><strong>\u6838\u5fc3\u80fd\u529b<\/strong>\uff1a<\/p>\n<ul>\n<li>\u4e00\u6761 <code>docker run<\/code> \u62c9\u8d77\u4efb\u610f\u955c\u50cf\uff0c\u6570\u636e\u5e93\u3001\u4e2d\u95f4\u4ef6\u3001Web \u670d\u52a1\u901a\u901a\u9694\u79bb\u8fd0\u884c\uff0c\u5220\u6389\u5bb9\u5668\u4e3b\u673a\u96f6\u6b8b\u7559<\/li>\n<li>\u56fe\u5f62\u754c\u9762\u80fd\u770b\u5230\u5bb9\u5668\u3001\u955c\u50cf\u3001\u5377\u7684\u5b9e\u65f6\u72b6\u6001\uff0c\u65e5\u5fd7\u70b9\u5f00\u5c31\u770b\uff0c\u4e0d\u7528\u8bb0\u4e00\u5806\u547d\u4ee4<\/li>\n<li>\u901a\u8fc7 WSL2 \u540e\u7aef\u5728 Windows \u4e0a\u83b7\u5f97\u63a5\u8fd1\u539f\u751f\u7684\u6027\u80fd\uff0c\u6587\u4ef6\u6302\u8f7d\u3001\u7aef\u53e3\u6620\u5c04\u90fd\u662f\u81ea\u52a8\u7684<\/li>\n<li>\u5185\u7f6e Kubernetes \u4e00\u952e\u5f00\u5173\uff0c\u60f3\u5b66 K8s \u4e0d\u7528\u518d\u5355\u72ec\u642d\u96c6\u7fa4<\/li>\n<li>\u652f\u6301\u5728 Windows \u4e0e Linux \u5bb9\u5668\u4e4b\u95f4\u4e00\u952e\u5207\u6362\uff0c\u4e24\u79cd\u5bb9\u5668\u90fd\u80fd\u5728\u672c\u673a\u8dd1<\/li>\n<li>\u8d44\u6e90\u914d\u989d\u53ef\u89c6\u5316\u8c03\u6574\uff1a\u7ed9\u5bb9\u5668\u9650\u591a\u5c11 CPU\u3001\u591a\u5c11\u5185\u5b58\uff0c\u62d6\u4e2a\u6ed1\u5757\u5c31\u884c<\/li>\n<\/ul>\n<p><strong>\u5b9e\u6d4b\u4f53\u9a8c<\/strong>\uff1a\u5728\u4e00\u53f0 16GB \u5185\u5b58\u7684\u666e\u901a\u7b14\u8bb0\u672c\u4e0a\uff0c\u5b89\u88c5\u5305\u7ea6 500MB\uff0c\u88c5\u5b8c\u52fe\u9009 WSL2 \u540e\u7aef\u91cd\u542f\u4e00\u6b21\u5373\u53ef\u3002\u5b9e\u6d4b\u62c9\u53d6 MySQL 8 \u955c\u50cf\u7ea6 40 \u79d2\uff0c\u542f\u52a8\u5230\u53ef\u8fde\u63a5\u5927\u7ea6 10 \u79d2\uff1b<code>docker compose up<\/code> \u4e00\u6b21\u6027\u62c9\u8d77 MySQL + Redis + \u540e\u7aef\u670d\u52a1\uff0c\u5168\u7a0b\u4e0d\u5230\u4e00\u5206\u949f\u3002\u505c\u6b62\u5e76\u5220\u9664\u5bb9\u5668\u540e\uff0c\u4efb\u52a1\u7ba1\u7406\u5668\u91cc\u5e72\u5e72\u51c0\u51c0\u3002\u5e73\u65f6\u6302\u7740\u4e0d\u5f00\u5bb9\u5668\u65f6\uff0c\u540e\u53f0\u5360\u7528\u5927\u7ea6 1GB \u5185\u5b58\uff0c\u5c5e\u4e8e\u53ef\u63a5\u53d7\u8303\u56f4\u3002<\/p>\n<p>\u8fd8\u6709\u4e24\u4e2a\u7ec6\u8282\u503c\u5f97\u8bf4\uff1a\u4e00\u662f\u56fe\u5f62\u754c\u9762\u91cc\u70b9\u5bb9\u5668\u5c31\u80fd\u8fdb\u7ec8\u7aef\uff0c\u6392\u67e5\u95ee\u9898\u65f6\u4e0d\u7528\u5148\u67e5 <code>docker exec<\/code> \u7684\u53c2\u6570\u987a\u5e8f\uff1b\u4e8c\u662f\u914d\u5408 VS Code \u7684 Dev Containers \u6269\u5c55\uff0c\u53ef\u4ee5\u628a\u6574\u4e2a\u5f00\u53d1\u73af\u5883\u585e\u8fdb\u5bb9\u5668\u91cc\uff0c\u6362\u7535\u8111\u53ea\u9700\u5e26\u4e0a\u4e00\u4e2a compose \u6587\u4ef6\uff0c\u73af\u5883\u5206\u949f\u7ea7\u590d\u523b\u3002\u8fd9\u4e24\u70b9\u53e0\u52a0\u8d77\u6765\uff0cDocker Desktop \u5c31\u4e0d\u53ea\u662f\u4e00\u4e2a\u8fd0\u884c\u5bb9\u5668\u7684\u5de5\u5177\uff0c\u800c\u662f\u6574\u5957\u53ef\u8fc1\u79fb\u7684\u5f00\u53d1\u73af\u5883\u65b9\u6848\u3002<\/p>\n<p><strong>\u9002\u5408\u8c01<\/strong>\uff1a\u540e\u7aef\u5f00\u53d1\u8005\u3001\u9700\u8981\u642d\u5404\u79cd\u4e2d\u95f4\u4ef6\u7684\u6d4b\u8bd5\u540c\u5b66\u3001\u60f3\u5728\u672c\u5730\u5b66 Kubernetes \u7684\u4eba\uff1b\u8fd0\u7ef4\u4eba\u5458\u505a\u73af\u5883\u9a8c\u8bc1\u4e5f\u5f88\u987a\u624b\u3002\u5199\u6280\u672f\u535a\u5ba2\u60f3\u590d\u73b0\u5f00\u6e90\u9879\u76ee\u73af\u5883\u7684\u540c\u5b66\u540c\u6837\u503c\u5f97\u4e00\u8bd5\uff0c\u5f88\u591a\u5f00\u6e90\u4ed3\u5e93\u81ea\u5e26 compose \u6587\u4ef6\uff0c\u514b\u9686\u4e0b\u6765\u5c31\u80fd\u4e00\u952e\u8d77\u5168\u5957\u4f9d\u8d56\u3002<\/p>\n<p><strong>\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9<\/strong>\uff1a<\/p>\n<ul>\n<li>Docker Desktop \u5bf9\u4e2a\u4eba\u5b66\u4e60\u3001\u5c0f\u578b\u56e2\u961f\u514d\u8d39\uff0c\u5458\u5de5\u8d85\u8fc7 250 \u4eba\u6216\u5e74\u6536\u5165\u8d85\u8fc7 1000 \u4e07\u7f8e\u5143\u7684\u4f01\u4e1a\u9700\u8981\u4ed8\u8d39\u8ba2\u9605<\/li>\n<li>\u9700\u8981 Windows 10\/11 \u4e14\u5f00\u542f WSL2\uff0c\u8001\u673a\u5668\u5982\u679c\u865a\u62df\u5316\u6ca1\u5f00\uff0c\u88c5\u5b8c\u4f1a\u542f\u52a8\u5931\u8d25<\/li>\n<li>WSL2 \u865a\u62df\u78c1\u76d8\u9ed8\u8ba4\u53ea\u589e\u4e0d\u51cf\uff0c\u7528\u4e45\u4e86\u4f1a\u5360\u4e0d\u5c11\u7a7a\u95f4\uff0c\u8bb0\u5f97\u5b9a\u671f\u6e05\u7406\u65e0\u7528\u955c\u50cf\uff08<code>docker system prune<\/code>\uff09<\/li>\n<li>\u5bb9\u5668\u6570\u636e\u9ed8\u8ba4\u653e C \u76d8\uff0c\u53ef\u4ee5\u5728\u8bbe\u7f6e\u91cc\u628a WSL \u6570\u636e\u76d8\u632a\u5230\u5176\u4ed6\u5206\u533a<\/li>\n<li>\u516c\u53f8\u5185\u7f51\u5e38\u89c1\u79c1\u6709\u955c\u50cf\u4ed3\u5e93\uff0c\u9700\u8981\u5728\u8bbe\u7f6e\u91cc\u989d\u5916\u914d\u7f6e insecure registries \u6216\u8bc1\u4e66\uff0c\u7b2c\u4e00\u6b21\u914d\u4f1a\u67e5\u4e00\u70b9\u8d44\u6599<\/li>\n<\/ul>\n<p><strong>\u5c0f\u7ed3<\/strong>\uff1aDocker Desktop \u628a&quot;\u914d\u73af\u5883&quot;\u8fd9\u4ef6\u4e8b\u4ece\u534a\u5929\u538b\u7f29\u5230\u51e0\u5206\u949f\uff0c\u56fe\u5f62\u754c\u9762\u53c8\u66ff\u65b0\u624b\u6321\u6389\u4e86\u5927\u91cf\u547d\u4ee4\u884c\u95e8\u69db\u3002\u5982\u679c\u4f60\u8fd8\u5728\u88ab\u5404\u79cd\u7248\u672c\u51b2\u7a81\u6298\u78e8\uff0c\u88c5\u4e00\u6b21\u5b83\u80fd\u7701\u4e0b\u540e\u9762\u65e0\u6570\u6b21\u91cd\u88c5\u7cfb\u7edf\u7684\u51b2\u52a8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd8\u6709\u4e24\u4e2a\u7ec6\u8282\u503c\u5f97\u8bf4\uff1a\u4e00\u662f\u56fe\u5f62\u754c\u9762\u91cc\u70b9\u5bb9\u5668\u5c31\u80fd\u8fdb\u7ec8\u7aef\uff0c\u6392\u67e5\u95ee\u9898\u65f6\u4e0d\u7528\u5148\u67e5 `docker exec` \u7684\u53c2\u6570\u987a\u5e8f\uff1b\u4e8c\u662f\u914d\u5408 VS Code \u7684 Dev Containers \u6269\u5c55\uff0c\u53ef\u4ee5\u628a\u6574\u4e2a\u5f00\u53d1\u73af\u5883\u585e\u8fdb\u5bb9\u5668\u91cc\uff0c\u6362\u7535\u8111\u53ea\u9700\u5e26\u4e0a\u4e00\u4e2a compos<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":0,"href":"https:\/\/laoke.pw\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"wp:attachment":[{"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoke.pw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}