mirror of
https://github.com/dockur/windows.git
synced 2026-01-22 10:53:06 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b92d2589b1 | ||
|
|
4534f66d73 | ||
|
|
45582e8fd6 | ||
|
|
4e9ac3ef37 | ||
|
|
42a5295306 | ||
|
|
249c5b7731 | ||
|
|
14c149782a | ||
|
|
08648d1194 | ||
|
|
32ede2ec23 |
@@ -9,8 +9,13 @@ RUN apt-get update \
|
|||||||
&& apt-get --no-install-recommends -y install \
|
&& apt-get --no-install-recommends -y install \
|
||||||
curl \
|
curl \
|
||||||
7zip \
|
7zip \
|
||||||
|
wsdd \
|
||||||
|
samba \
|
||||||
wimtools \
|
wimtools \
|
||||||
|
dos2unix \
|
||||||
|
cabextract \
|
||||||
genisoimage \
|
genisoimage \
|
||||||
|
libxml2-utils \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
|||||||
@@ -318,7 +318,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -340,8 +340,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -393,11 +393,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -314,7 +314,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -336,8 +336,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -389,11 +389,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -332,7 +332,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -354,8 +354,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -417,11 +417,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>14</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -224,8 +224,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -259,29 +259,29 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>8</Order>
|
<Order>8</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
||||||
|
<Description>Disable Network Discovery popup</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Disable first-run experience in Edge</Description>
|
<Description>Disable first-run experience in Edge</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>9</Order>
|
<Order>10</Order>
|
||||||
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Show file extensions in Explorer</Description>
|
<Description>Show file extensions in Explorer</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>10</Order>
|
<Order>11</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Zero Hibernation File</Description>
|
<Description>Zero Hibernation File</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>11</Order>
|
<Order>12</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
|
||||||
<Description>Disable Network Discovery popup</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -263,8 +263,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -316,11 +316,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -263,8 +263,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -316,11 +316,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -267,8 +267,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -320,11 +320,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -267,8 +267,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -320,11 +320,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -227,8 +227,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -262,29 +262,29 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>8</Order>
|
<Order>8</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
||||||
|
<Description>Disable Network Discovery popup</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Disable first-run experience in Edge</Description>
|
<Description>Disable first-run experience in Edge</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>9</Order>
|
<Order>10</Order>
|
||||||
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Show file extensions in Explorer</Description>
|
<Description>Show file extensions in Explorer</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>10</Order>
|
<Order>11</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Zero Hibernation File</Description>
|
<Description>Zero Hibernation File</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>11</Order>
|
<Order>12</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
|
||||||
<Description>Disable Network Discovery popup</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -257,8 +257,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -310,11 +310,6 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>msiexec /i E:\virtio-win-gt-x64.msi /qb!</CommandLine>
|
|
||||||
<Description>Install VirtIO drivers</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>Docker</Username>
|
<Username>Docker</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>65432</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value />
|
<Value />
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
<FirstLogonCommands>
|
<FirstLogonCommands>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>1</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Set AutoLogonCount to 0</Description>
|
<Description>Allow guest access to network shares</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>2</Order>
|
<Order>2</Order>
|
||||||
@@ -201,29 +201,29 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>8</Order>
|
<Order>8</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
||||||
|
<Description>Disable Network Discovery popup</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>9</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Disable first-run experience in Edge</Description>
|
<Description>Disable first-run experience in Edge</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>9</Order>
|
<Order>10</Order>
|
||||||
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Show file extensions in Explorer</Description>
|
<Description>Show file extensions in Explorer</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>10</Order>
|
<Order>11</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Zero Hibernation File</Description>
|
<Description>Zero Hibernation File</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>11</Order>
|
<Order>12</Order>
|
||||||
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
<Description>Disable Hibernation Mode</Description>
|
<Description>Disable Hibernation Mode</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>12</Order>
|
|
||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
|
|
||||||
<Description>Disable Network Discovery popup</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>13</Order>
|
<Order>13</Order>
|
||||||
<CommandLine>netsh.exe advfirewall firewall set rule group="Remote Desktop" new enable=Yes</CommandLine>
|
<CommandLine>netsh.exe advfirewall firewall set rule group="Remote Desktop" new enable=Yes</CommandLine>
|
||||||
@@ -244,6 +244,11 @@
|
|||||||
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar" /v "TurnOffSidebar" /t REG_DWORD /d 1 /f</CommandLine>
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar" /v "TurnOffSidebar" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
<Description>Turn off sidebar</Description>
|
<Description>Turn off sidebar</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<CommandLine>reg.exe add "HKCU\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Disable screensaver</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
</FirstLogonCommands>
|
</FirstLogonCommands>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
27
readme.md
27
readme.md
@@ -92,6 +92,8 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
| `tiny11` | Tiny 11 | Archive.org | Slow | 3.8 GB |
|
| `tiny11` | Tiny 11 | Archive.org | Slow | 3.8 GB |
|
||||||
| `tiny10` | Tiny 10 | Archive.org | Slow | 3.6 GB |
|
| `tiny10` | Tiny 10 | Archive.org | Slow | 3.6 GB |
|
||||||
|
|
||||||
|
To install ARM64 versions of Windows use [dockur/windows-arm](https://github.com/dockur/windows-arm/).
|
||||||
|
|
||||||
* ### How do I increase the amount of CPU or RAM?
|
* ### How do I increase the amount of CPU or RAM?
|
||||||
|
|
||||||
By default, 2 CPU cores and 4 GB of RAM are allocated to the container, as those are the minimum requirements of Windows 11.
|
By default, 2 CPU cores and 4 GB of RAM are allocated to the container, as those are the minimum requirements of Windows 11.
|
||||||
@@ -126,6 +128,17 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
|
|
||||||
Replace the example path `/var/win` with the desired storage folder.
|
Replace the example path `/var/win` with the desired storage folder.
|
||||||
|
|
||||||
|
* ### How do I install a custom image?
|
||||||
|
|
||||||
|
In order to download a custom ISO image, start a clean container with the URL specified in the `VERSION` environment variable:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
VERSION: "https://example.com/win.iso"
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can also rename a local file to `custom.iso` and place it in an empty `/storage` folder to skip the download.
|
||||||
|
|
||||||
* ### How do I perform a manual installation?
|
* ### How do I perform a manual installation?
|
||||||
|
|
||||||
It's best to use the automatic installation, as it optimizes various settings for use with this container.
|
It's best to use the automatic installation, as it optimizes various settings for use with this container.
|
||||||
@@ -155,17 +168,6 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
|
|
||||||
Enjoy your brand new machine, and don't forget to star this repo!
|
Enjoy your brand new machine, and don't forget to star this repo!
|
||||||
|
|
||||||
* ### How do I install a custom image?
|
|
||||||
|
|
||||||
In order to download a custom ISO image, start a clean container with the URL specified in the `VERSION` environment variable:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
environment:
|
|
||||||
VERSION: "https://example.com/win.iso"
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, you can also rename a local file to `custom.iso` and place it in an empty `/storage` folder to skip the download.
|
|
||||||
|
|
||||||
* ### How do I assign an individual IP address to the container?
|
* ### How do I assign an individual IP address to the container?
|
||||||
|
|
||||||
By default, the container uses bridge networking, which shares the IP address with the host.
|
By default, the container uses bridge networking, which shares the IP address with the host.
|
||||||
@@ -258,6 +260,9 @@ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
|
|
||||||
Yes, this project contains only open-source code and does not distribute any copyrighted material. Neither does it try to circumvent any copyright protection measures. So under all applicable laws, this project would be considered legal.
|
Yes, this project contains only open-source code and does not distribute any copyrighted material. Neither does it try to circumvent any copyright protection measures. So under all applicable laws, this project would be considered legal.
|
||||||
|
|
||||||
|
## Stars
|
||||||
|
[](https://starchart.cc/dockur/windows)
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Microsoft Corporation.
|
The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Microsoft Corporation.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ cd /run
|
|||||||
. disk.sh # Initialize disks
|
. disk.sh # Initialize disks
|
||||||
. display.sh # Initialize graphics
|
. display.sh # Initialize graphics
|
||||||
. network.sh # Initialize network
|
. network.sh # Initialize network
|
||||||
|
. samba.sh # Configure samba
|
||||||
. boot.sh # Configure boot
|
. boot.sh # Configure boot
|
||||||
. proc.sh # Initialize processor
|
. proc.sh # Initialize processor
|
||||||
. power.sh # Configure shutdown
|
. power.sh # Configure shutdown
|
||||||
|
|||||||
217
src/install.sh
217
src/install.sh
@@ -100,6 +100,7 @@ CUSTOM="custom.iso"
|
|||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
|
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
|
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
|
||||||
|
|
||||||
|
ESD_URL=""
|
||||||
MACHINE="q35"
|
MACHINE="q35"
|
||||||
TMP="$STORAGE/tmp"
|
TMP="$STORAGE/tmp"
|
||||||
DIR="$TMP/unpack"
|
DIR="$TMP/unpack"
|
||||||
@@ -358,6 +359,74 @@ startInstall() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getESD() {
|
||||||
|
|
||||||
|
local dir="$1"
|
||||||
|
local file="$2"
|
||||||
|
local architecture="x64"
|
||||||
|
local winCatalog size
|
||||||
|
|
||||||
|
case "${VERSION,,}" in
|
||||||
|
win11x64)
|
||||||
|
winCatalog="https://go.microsoft.com/fwlink?linkid=2156292"
|
||||||
|
;;
|
||||||
|
win10x64)
|
||||||
|
winCatalog="https://go.microsoft.com/fwlink/?LinkId=841361"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
error "Invalid ESD version specified: $VERSION"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
local msg="Downloading product information from Microsoft..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
rm -rf "$dir"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
|
||||||
|
local wFile="catalog.cab"
|
||||||
|
|
||||||
|
{ wget "$winCatalog" -O "$dir/$wFile" -q --no-check-certificate; rc=$?; } || :
|
||||||
|
(( rc != 0 )) && error "Failed to download $winCatalog , reason: $rc" && return 1
|
||||||
|
|
||||||
|
cd "$dir"
|
||||||
|
|
||||||
|
if ! cabextract "$wFile" > /dev/null; then
|
||||||
|
cd /run
|
||||||
|
error "Failed to extract CAB file!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /run
|
||||||
|
|
||||||
|
if [ ! -f "$dir/products.xml" ]; then
|
||||||
|
error "Failed to find products.xml!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local esdLang="en-us"
|
||||||
|
local editionName="Professional"
|
||||||
|
local edQuery='//File[Architecture="'${architecture}'"][Edition="'${editionName}'"]'
|
||||||
|
|
||||||
|
echo -e '<Catalog>' > "${dir}/products_filter.xml"
|
||||||
|
xmllint --nonet --xpath "${edQuery}" "${dir}/products.xml" >> "${dir}/products_filter.xml" 2>/dev/null
|
||||||
|
echo -e '</Catalog>'>> "${dir}/products_filter.xml"
|
||||||
|
xmllint --nonet --xpath '//File[LanguageCode="'${esdLang}'"]' "${dir}/products_filter.xml" >"${dir}/esd_edition.xml"
|
||||||
|
|
||||||
|
size=$(stat -c%s "${dir}/esd_edition.xml")
|
||||||
|
if ((size<20)); then
|
||||||
|
error "Failed to find Windows product!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ESD_URL=$(xmllint --nonet --xpath '//FilePath' "${dir}/esd_edition.xml" | sed -E -e 's/<[\/]?FilePath>//g')
|
||||||
|
|
||||||
|
if [ -z "$ESD_URL" ]; then
|
||||||
|
error "Failed to find ESD url!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "$dir"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
downloadImage() {
|
downloadImage() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
@@ -382,7 +451,6 @@ downloadImage() {
|
|||||||
|
|
||||||
local msg="Downloading $desc..."
|
local msg="Downloading $desc..."
|
||||||
info "$msg" && html "$msg"
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
/run/progress.sh "$file" "Downloading $desc ([P])..." &
|
/run/progress.sh "$file" "Downloading $desc ([P])..." &
|
||||||
|
|
||||||
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
if [[ "$EXTERNAL" != [Yy1]* ]]; then
|
||||||
@@ -392,30 +460,140 @@ downloadImage() {
|
|||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
fKill "progress.sh"
|
fKill "progress.sh"
|
||||||
(( rc != 0 )) && return 1
|
|
||||||
|
|
||||||
else
|
if (( rc == 0 )); then
|
||||||
|
|
||||||
# Check if running with interactive TTY or redirected to docker log
|
[ ! -f "$iso" ] && return 1
|
||||||
if [ -t 1 ]; then
|
|
||||||
progress="--progress=bar:noscroll"
|
html "Download finished successfully..."
|
||||||
else
|
return 0
|
||||||
progress="--progress=dot:giga"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{ wget "$url" -O "$iso" -q --no-check-certificate --show-progress "$progress"; rc=$?; } || :
|
if [[ "$VERSION" != "win10x64"* ]] && [[ "$VERSION" != "win11x64" ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
fKill "progress.sh"
|
info "Failed to download $desc using Mido, will try a different method now..."
|
||||||
(( rc != 0 )) && error "Failed to download $url , reason: $rc" && exit 60
|
|
||||||
|
ISO="$TMP/$VERSION.esd"
|
||||||
|
iso="$ISO"
|
||||||
|
file="$ISO"
|
||||||
|
rm -f "$iso"
|
||||||
|
|
||||||
|
if ! getESD "$TMP/esd" "$iso"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
url="$ESD_URL"
|
||||||
|
msg="Downloading $desc..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
/run/progress.sh "$iso" "Downloading $desc ([P])..." &
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if running with interactive TTY or redirected to docker log
|
||||||
|
if [ -t 1 ]; then
|
||||||
|
progress="--progress=bar:noscroll"
|
||||||
|
else
|
||||||
|
progress="--progress=dot:giga"
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ wget "$url" -O "$iso" -q --no-check-certificate --show-progress "$progress"; rc=$?; } || :
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
|
(( rc != 0 )) && error "Failed to download $url , reason: $rc" && exit 60
|
||||||
|
|
||||||
[ ! -f "$iso" ] && return 1
|
[ ! -f "$iso" ] && return 1
|
||||||
|
|
||||||
html "Download finished successfully..."
|
html "Download finished successfully..."
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extractESD() {
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
local dir="$2"
|
||||||
|
local size size_gb space space_gb desc
|
||||||
|
|
||||||
|
desc=$(printVersion "$VERSION")
|
||||||
|
local msg="Extracting $desc bootdisk..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
size=16106127360
|
||||||
|
size_gb=$(( (size + 1073741823)/1073741824 ))
|
||||||
|
space=$(df --output=avail -B 1 "$TMP" | tail -n 1)
|
||||||
|
space_gb=$(( (space + 1073741823)/1073741824 ))
|
||||||
|
|
||||||
|
if ((size<10000000)); then
|
||||||
|
error "Invalid ESD file: Size is smaller than 10 MB" && exit 62
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( size > space )); then
|
||||||
|
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && exit 63
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "$dir"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
|
||||||
|
local esdImageCount
|
||||||
|
esdImageCount=$(wimlib-imagex info "${iso}" | awk '/Image Count:/ {print $3}')
|
||||||
|
|
||||||
|
wimlib-imagex apply "$iso" 1 "${dir}" --quiet 2>/dev/null || {
|
||||||
|
retVal=$?
|
||||||
|
error "Extracting bootdisk failed" && return $retVal
|
||||||
|
}
|
||||||
|
|
||||||
|
local bootWimFile="${dir}/sources/boot.wim"
|
||||||
|
local installWimFile="${dir}/sources/install.wim"
|
||||||
|
|
||||||
|
local msg="Extracting $desc environment..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
wimlib-imagex export "${iso}" 2 "${bootWimFile}" --compress=LZX --chunk-size 32K --quiet || {
|
||||||
|
retVal=$?
|
||||||
|
error "Adding WinPE failed" && return ${retVal}
|
||||||
|
}
|
||||||
|
|
||||||
|
local msg="Extracting $desc setup..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
wimlib-imagex export "${iso}" 3 "$bootWimFile" --compress=LZX --chunk-size 32K --boot --quiet || {
|
||||||
|
retVal=$?
|
||||||
|
error "Adding Windows Setup failed" && return ${retVal}
|
||||||
|
}
|
||||||
|
|
||||||
|
local msg="Extracting $desc image..."
|
||||||
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
local edition imageIndex imageEdition
|
||||||
|
|
||||||
|
case "${VERSION,,}" in
|
||||||
|
win11x64)
|
||||||
|
edition="11 pro"
|
||||||
|
;;
|
||||||
|
win10x64)
|
||||||
|
edition="10 pro"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
error "Invalid version specified: $VERSION"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
|
||||||
|
imageEdition=$(wimlib-imagex info "${iso}" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//')
|
||||||
|
[[ "${imageEdition,,}" != *"$edition"* ]] && continue
|
||||||
|
wimlib-imagex export "${iso}" ${imageIndex} "${installWimFile}" --compress=LZMS --chunk-size 128K --quiet || {
|
||||||
|
retVal=$?
|
||||||
|
error "Addition of ${imageIndex} to the image failed" && return $retVal
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
done
|
||||||
|
|
||||||
|
error "Failed to find product in install.wim!"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
extractImage() {
|
extractImage() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
@@ -423,6 +601,14 @@ extractImage() {
|
|||||||
local desc="downloaded ISO"
|
local desc="downloaded ISO"
|
||||||
local size size_gb space space_gb
|
local size size_gb space space_gb
|
||||||
|
|
||||||
|
if [[ "${iso,,}" == *".esd" ]]; then
|
||||||
|
if ! extractESD "$iso" "$dir"; then
|
||||||
|
error "Failed to extract ESD file!"
|
||||||
|
exit 67
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then
|
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then
|
||||||
desc=$(printVersion "$VERSION")
|
desc=$(printVersion "$VERSION")
|
||||||
[ -z "$desc" ] && desc="downloaded ISO"
|
[ -z "$desc" ] && desc="downloaded ISO"
|
||||||
@@ -640,7 +826,7 @@ prepareXP() {
|
|||||||
echo "AdminPassword=*"
|
echo "AdminPassword=*"
|
||||||
echo "TimeZone=0"
|
echo "TimeZone=0"
|
||||||
echo "AutoLogon=Yes"
|
echo "AutoLogon=Yes"
|
||||||
echo "AutoLogonCount=99999"
|
echo "AutoLogonCount=65432"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[UserData]"
|
echo "[UserData]"
|
||||||
echo "FullName=\"Docker\""
|
echo "FullName=\"Docker\""
|
||||||
@@ -649,11 +835,16 @@ prepareXP() {
|
|||||||
echo "ProductKey=$key"
|
echo "ProductKey=$key"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[Identification]"
|
echo "[Identification]"
|
||||||
echo "JoinWorkgroup"
|
echo "JoinWorkgroup = WORKGROUP"
|
||||||
echo ""
|
echo ""
|
||||||
echo "[Networking]"
|
echo "[Networking]"
|
||||||
echo "InstallDefaultComponents=Yes"
|
echo "InstallDefaultComponents=Yes"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "[URL]"
|
||||||
|
echo "Home_Page = http://www.google.com"
|
||||||
|
echo "Search_Page = http://www.google.com/ie_rsearch.html"
|
||||||
|
echo "AutoConfig = 0"
|
||||||
|
echo ""
|
||||||
echo "[RegionalSettings]"
|
echo "[RegionalSettings]"
|
||||||
echo "Language=00000409"
|
echo "Language=00000409"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
53
src/power.sh
53
src/power.sh
@@ -22,6 +22,29 @@ _trap() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ready() {
|
||||||
|
|
||||||
|
[ -f "$STORAGE/windows.boot" ] && return 0
|
||||||
|
[ ! -f "$QEMU_PTY" ] && return 1
|
||||||
|
|
||||||
|
if [ -f "$STORAGE/windows.old" ]; then
|
||||||
|
local last
|
||||||
|
local bios="Booting from Hard"
|
||||||
|
last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1)
|
||||||
|
if [[ "${last,,}" == "${bios,,}"* ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local line="Windows Boot Manager"
|
||||||
|
if grep -Fq "$line" "$QEMU_PTY"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
finish() {
|
finish() {
|
||||||
|
|
||||||
local pid
|
local pid
|
||||||
@@ -40,9 +63,20 @@ finish() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$STORAGE/$BASE" ]; then
|
||||||
|
# Remove CD-ROM ISO after install
|
||||||
|
if ready; then
|
||||||
|
rm -f "$STORAGE/$BASE"
|
||||||
|
touch "$STORAGE/windows.boot"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
pid="/var/run/tpm.pid"
|
pid="/var/run/tpm.pid"
|
||||||
[ -f "$pid" ] && pKill "$(<"$pid")"
|
[ -f "$pid" ] && pKill "$(<"$pid")"
|
||||||
|
|
||||||
|
fKill "wsdd"
|
||||||
|
fKill "smbd"
|
||||||
|
|
||||||
closeNetwork
|
closeNetwork
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
@@ -116,17 +150,9 @@ _graceful_shutdown() {
|
|||||||
finish "$code" && return "$code"
|
finish "$code" && return "$code"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local remove_iso=""
|
if ! ready; then
|
||||||
|
info "Cannot send ACPI signal during Windows setup, aborting..."
|
||||||
if [ ! -f "$STORAGE/windows.old" ]; then
|
finish "$code" && return "$code"
|
||||||
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$QEMU_PTY" ]; then
|
|
||||||
if grep -Fq "Windows Boot Manager" "$QEMU_PTY"; then
|
|
||||||
[ -f "$STORAGE/$BASE" ] && remove_iso="y"
|
|
||||||
else
|
|
||||||
info "Cannot send ACPI signal during Windows setup, aborting..."
|
|
||||||
finish "$code" && return "$code"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Send ACPI shutdown signal
|
# Send ACPI shutdown signal
|
||||||
@@ -151,11 +177,6 @@ _graceful_shutdown() {
|
|||||||
|
|
||||||
if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then
|
if [ "$cnt" -ge "$QEMU_TIMEOUT" ]; then
|
||||||
error "Shutdown timeout reached, aborting..."
|
error "Shutdown timeout reached, aborting..."
|
||||||
else
|
|
||||||
if [ -n "$remove_iso" ]; then
|
|
||||||
rm -f "$STORAGE/$BASE"
|
|
||||||
touch "$STORAGE/windows.boot"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finish "$code" && return "$code"
|
finish "$code" && return "$code"
|
||||||
|
|||||||
63
src/samba.sh
Normal file
63
src/samba.sh
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
[[ "$DHCP" == [Yy1]* ]] && return 0
|
||||||
|
|
||||||
|
SHARE="$STORAGE/shared"
|
||||||
|
|
||||||
|
mkdir -p "$SHARE"
|
||||||
|
chmod -R 777 "$SHARE"
|
||||||
|
|
||||||
|
SAMBA="/etc/samba/smb.conf"
|
||||||
|
|
||||||
|
{ echo "[global]"
|
||||||
|
echo " server string = Dockur"
|
||||||
|
echo " netbios name = dockur"
|
||||||
|
echo " workgroup = WORKGROUP"
|
||||||
|
echo " interfaces = dockerbridge"
|
||||||
|
echo " bind interfaces only = yes"
|
||||||
|
echo " security = user"
|
||||||
|
echo " guest account = nobody"
|
||||||
|
echo " map to guest = Bad User"
|
||||||
|
echo " server min protocol = SMB2"
|
||||||
|
echo ""
|
||||||
|
echo " # disable printing services"
|
||||||
|
echo " load printers = no"
|
||||||
|
echo " printing = bsd"
|
||||||
|
echo " printcap name = /dev/null"
|
||||||
|
echo " disable spoolss = yes"
|
||||||
|
echo ""
|
||||||
|
echo "[Data]"
|
||||||
|
echo " path = $SHARE"
|
||||||
|
echo " comment = Shared"
|
||||||
|
echo " writable = yes"
|
||||||
|
echo " guest ok = yes"
|
||||||
|
echo " guest only = yes"
|
||||||
|
echo " force user = root"
|
||||||
|
echo " force group = root"
|
||||||
|
} > "$SAMBA"
|
||||||
|
|
||||||
|
{ echo "--------------------------------------------------------"
|
||||||
|
echo " $APP for Docker v$(</run/version)..."
|
||||||
|
echo " For support visit $SUPPORT"
|
||||||
|
echo "--------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
echo "Using this folder you can share files with the host machine."
|
||||||
|
echo ""
|
||||||
|
echo "To change the storage location, include the following bind mount in your compose file:"
|
||||||
|
echo ""
|
||||||
|
echo " volumes:"
|
||||||
|
echo " - \"/home/user/example:/storage/shared\""
|
||||||
|
echo ""
|
||||||
|
echo "Or in your run command:"
|
||||||
|
echo ""
|
||||||
|
echo " -v \"/home/user/example:/storage/shared\""
|
||||||
|
echo ""
|
||||||
|
echo "Replace the example path /home/user/example with the desired storage folder."
|
||||||
|
echo ""
|
||||||
|
} | unix2dos > "$SHARE/readme.txt"
|
||||||
|
|
||||||
|
smbd -D
|
||||||
|
wsdd -i dockerbridge -p -n "host.lan" &
|
||||||
|
|
||||||
|
return 0
|
||||||
Reference in New Issue
Block a user