{"id":4476,"date":"2024-05-09T16:52:58","date_gmt":"2024-05-09T08:52:58","guid":{"rendered":"https:\/\/benson80.eu.org\/?p=4476"},"modified":"2025-05-11T14:48:24","modified_gmt":"2025-05-11T06:48:24","slug":"%e4%bd%bf%e7%94%a8docker%e8%bf%90%e8%a1%8cwindows","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=4476","title":{"rendered":"\u4f7f\u7528Docker\u8fd0\u884cWindows"},"content":{"rendered":"\n<p>Github\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/dockur\/windows\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/dockur\/windows<\/a><\/p>\n\n\n\n<p>\u9996\u5148\u5728Window\u4e2d\u5b89\u88c5Docker for Windows\u684c\u9762\u7248\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<p>fsutil file createnew E:\\docker-windows\\windows-disk.img 34359738368<\/p>\n\n\n\n<p>docker run -it &#8211;name windows -p 8006:8006 -p 3390:3389 &#8211;device=\/dev\/kvm &#8211;device=\/dev\/net\/tun &#8211;cap-add NET_ADMIN &#8211;stop-timeout 120 -e DISK_SIZE=&#8221;32G&#8221; -e RAM_SIZE=&#8221;8G&#8221; -e CPU_CORES=&#8221;8&#8243; -e USERNAME=&#8221;administrator&#8221; -e PASSWORD=&#8221;123456&#8243; -v \/e\/win11x64.iso:\/boot.iso -v \/e\/install.bat:\/oem\/install.bat -v \/e\/docker-windows\/windows-disk.img:\/data\/disk.img dockurr\/windows<\/p>\n\n\n\n<p>\u4e0b\u6b21\u91cd\u542f\u7ee7\u7eed\u8fd0\u884c\uff1a<\/p>\n\n\n\n<p>docker start -ai windows<\/p>\n\n\n\n<p><strong>install.bat<\/strong>\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>@echo off<\/p>\n\n\n\n<p>echo \u6b63\u5728\u6fc0\u6d3b Windows\u2026<br>cscript \/\/nologo C:\\Windows\\System32\\slmgr.vbs \/ipk RNQ6Y-J6RVB-8G4CW-GYTFF-Q9MQB<br>cscript \/\/nologo C:\\Windows\\System32\\slmgr.vbs \/skms kms.03k.org<br>cscript \/\/nologo C:\\Windows\\System32\\slmgr.vbs \/ato<\/p>\n\n\n\n<p>echo Windows \u6fc0\u6d3b\u5b8c\u6210\uff01<\/p>\n\n\n\n<p>echo \u6b63\u5728\u4e0b\u8f7d 7-Zip\u2026<br>curl -L -o C:\\oem\\7z2409-x64.exe https:\/\/www.7-zip.org\/a\/7z2409-x64.exe<\/p>\n\n\n\n<p>echo \u6b63\u5728\u4e0b\u8f7d \u5fae\u4fe1\u2026<br>curl -L -o C:\\oem\\WeChatWin.exe https:\/\/dldir1v6.qq.com\/weixin\/Universal\/Windows\/WeChatWin.exe<\/p>\n\n\n\n<p>echo \u6b63\u5728\u4e0b\u8f7d Chatbox\u2026<br>curl -L -o C:\\oem\\Chatbox-Setup.exe https:\/\/download.chatboxai.app\/releases\/Chatbox-1.12.3-Setup.exe<\/p>\n\n\n\n<p>echo \u5f00\u59cb\u5b89\u88c5 7-Zip\u2026<br>C:\\oem\\7z2409-x64.exe \/S<\/p>\n\n\n\n<p>echo \u89e3\u538b\u5fae\u4fe1\u5b89\u88c5\u5305\u4e3a\u7eff\u8272\u7248\u2026<br>&#8220;C:\\Program Files\\7-Zip\\7z.exe&#8221; x C:\\oem\\WeChatWin.exe -oC:\\oem\\WeChat -y<\/p>\n\n\n\n<p>echo \u89e3\u538b install.7z\u2026<br>&#8220;C:\\Program Files\\7-Zip\\7z.exe&#8221; x C:\\oem\\WeChat\\install.7z -oC:\\oem\\WeChat\\install -y<\/p>\n\n\n\n<p>echo \u521b\u5efa\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u2026<br>powershell &#8220;$s=(New-Object -COM WScript.Shell).CreateShortcut(&#8216;%USERPROFILE%\\Desktop\\WeChat.lnk&#8217;);$s.TargetPath=&#8217;C:\\oem\\WeChat\\install\\Weixin.exe&#8217;;$s.WorkingDirectory=&#8217;C:\\oem\\WeChat\\install&#8217;;$s.IconLocation=&#8217;C:\\oem\\WeChat\\install\\Weixin.exe,0&#8242;;$s.Save()&#8221;<\/p>\n\n\n\n<p>echo \u5f00\u59cb\u5b89\u88c5 Chatbox\u2026<br>C:\\oem\\Chatbox-Setup.exe \/S<\/p>\n\n\n\n<p>echo \u6240\u6709\u64cd\u4f5c\u5b8c\u6210\uff01<br>pause<\/p>\n\n\n\n<p>\u6253\u5f00 <strong>\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5 (mstsc.exe)<\/strong><\/p>\n\n\n\n<p>&lt;\u5bbf\u4e3b\u673a IP&gt;:3390<\/p>\n\n\n\n<p>\u7528\u6237\u540d\u586b <code>administrator<\/code>\uff0c\u5bc6\u7801\u586b <code>123456<\/code><\/p>\n\n\n\n<p>docker run -it &#8211;rm &#8211;name windows -p 8006:8006 &#8211;device=\/dev\/kvm &#8211;device=\/dev\/net\/tun &#8211;cap-add NET_ADMIN &#8211;stop-timeout 120 dockurr\/windows<\/p>\n\n\n\n<p>\u9ed8\u8ba4\u4e0b\u8f7dWindows 11 Pro ISO\u955c\u50cf\u5e76\u5b89\u88c5\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u8f93\u5165http:\/\/127.0.0.1:8006\u53ef\u4ee5\u770b\u5230Windows\u6b63\u5728\u4e0b\u8f7d\u4e2d\u3002<\/p>\n\n\n\n<p>\u7528\u6237\u540d\uff1aDocker<\/p>\n\n\n\n<p>\u5bc6\u7801\uff1aadmin<\/p>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5bb9\u5668\u6700\u591a\u53ef\u4ee5\u4f7f\u7528 2 \u4e2a CPU \u5185\u6838\u548c 4 GB RAM\u3002\u78c1\u76d8\u5927\u5c0f\u9ed8\u8ba4\u4e3a64G<\/p>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5c06\u4e0b\u8f7d\u82f1\u6587\u7248\u7684 Windows\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u7248\u672c\u7684Windows\uff0c\u53ef\u4ee5\u5c06VERSION\u73af\u5883\u53d8\u91cf\u6dfb\u52a0\u5230<strong>compose.yml<\/strong>\u6587\u4ef6\u4e2d\uff0c\u6bd4\u5982\uff1a<br>environment:<br>VERSION: &#8220;11&#8221;<\/p>\n\n\n\n<p><strong>compose.yml<\/strong>\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<br>services:<br>windows:<br>image: dockurr\/windows<br>container_name: windows<br>environment:<br>VERSION: &#8220;11&#8221;<br>devices:<br>&#8211; \/dev\/kvm<br>&#8211; \/dev\/net\/tun<br>cap_add:<br>&#8211; NET_ADMIN<br>ports:<br>&#8211; 8006:8006<br>&#8211; 3389:3389\/tcp<br>&#8211; 3389:3389\/udp<br>volumes:<br>&#8211; .\/windows:\/storage<br>restart: always<br>stop_grace_period: 2m<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Value<\/strong><\/th><th><strong>Version<\/strong><\/th><th><strong>Size<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>11<\/code><\/td><td>Windows 11 Pro<\/td><td>5.4 GB<\/td><\/tr><tr><td><code>11l<\/code><\/td><td>Windows 11 LTSC<\/td><td>4.7 GB<\/td><\/tr><tr><td><code>11e<\/code><\/td><td>Windows 11 Enterprise<\/td><td>4.0 GB<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><\/tr><tr><td><code>10<\/code><\/td><td>Windows 10 Pro<\/td><td>5.7 GB<\/td><\/tr><tr><td><code>10l<\/code><\/td><td>Windows 10 LTSC<\/td><td>4.6 GB<\/td><\/tr><tr><td><code>10e<\/code><\/td><td>Windows 10 Enterprise<\/td><td>5.2 GB<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><\/tr><tr><td><code>8e<\/code><\/td><td>Windows 8.1 Enterprise<\/td><td>3.7 GB<\/td><\/tr><tr><td><code>7u<\/code><\/td><td>Windows 7 Ultimate<\/td><td>3.1 GB<\/td><\/tr><tr><td><code>vu<\/code><\/td><td>Windows Vista Ultimate<\/td><td>3.0 GB<\/td><\/tr><tr><td><code>xp<\/code><\/td><td>Windows XP Professional<\/td><td>0.6 GB<\/td><\/tr><tr><td><code>2k<\/code><\/td><td>Windows 2000 Professional<\/td><td>0.4 GB<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><\/tr><tr><td><code>2025<\/code><\/td><td>Windows Server 2025<\/td><td>5.6 GB<\/td><\/tr><tr><td><code>2022<\/code><\/td><td>Windows Server 2022<\/td><td>4.7 GB<\/td><\/tr><tr><td><code>2019<\/code><\/td><td>Windows Server 2019<\/td><td>5.3 GB<\/td><\/tr><tr><td><code>2016<\/code><\/td><td>Windows Server 2016<\/td><td>6.5 GB<\/td><\/tr><tr><td><code>2012<\/code><\/td><td>Windows Server 2012<\/td><td>4.3 GB<\/td><\/tr><tr><td><code>2008<\/code><\/td><td>Windows Server 2008<\/td><td>3.0 GB<\/td><\/tr><tr><td><code>2003<\/code><\/td><td>Windows Server 2003<\/td><td>0.6 GB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Github\u5730\u5740\uff1ahttps:\/\/github.c &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-4476","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4476"}],"version-history":[{"count":57,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4476\/revisions"}],"predecessor-version":[{"id":5900,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4476\/revisions\/5900"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}