mirror of
https://github.com/dockur/windows.git
synced 2026-01-22 02:43:06 +00:00
Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64ddb6d774 | ||
|
|
454cd8db68 | ||
|
|
5fac3fa33e | ||
|
|
186b2e21ce | ||
|
|
b8105e9072 | ||
|
|
9cad3f0994 | ||
|
|
f7a086a8d4 | ||
|
|
57ab7eb84f | ||
|
|
8be35e16d7 | ||
|
|
3cf95f2a0e | ||
|
|
22d318a9b4 | ||
|
|
974d087466 | ||
|
|
d5b891f4fb | ||
|
|
2296e3dbfa | ||
|
|
e16af78828 | ||
|
|
5ae6ecbe85 | ||
|
|
c9482fe3f0 | ||
|
|
63a9d10a27 | ||
|
|
009c2c7deb | ||
|
|
06434c02f4 | ||
|
|
32b92cc03a | ||
|
|
d799079040 | ||
|
|
b57d34e11e | ||
|
|
61d7e0d3be | ||
|
|
e6d7495bac | ||
|
|
faa7c58366 | ||
|
|
c0f5cca574 | ||
|
|
d86731dc24 | ||
|
|
bca8cb6817 | ||
|
|
d9c7983bb5 | ||
|
|
28f6e9c76b | ||
|
|
1081855571 | ||
|
|
57193b0f59 | ||
|
|
6825b6a45a | ||
|
|
c82725ec61 | ||
|
|
1f0cdc9bd1 | ||
|
|
9654a945fb | ||
|
|
a4fdfbdf91 | ||
|
|
b84a2b60a9 | ||
|
|
a5b4d7760d |
@@ -1,7 +1,7 @@
|
|||||||
ARG VERSION_ARG="latest"
|
ARG VERSION_ARG="latest"
|
||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu-docker:6.08 / /
|
COPY --from=qemux/qemu:6.21 / /
|
||||||
|
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
@@ -29,8 +29,7 @@ RUN set -eu && \
|
|||||||
COPY --chmod=755 ./src /run/
|
COPY --chmod=755 ./src /run/
|
||||||
COPY --chmod=755 ./assets /run/assets
|
COPY --chmod=755 ./assets /run/assets
|
||||||
|
|
||||||
ADD --chmod=755 https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd
|
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.45-0/virtio-win-1.9.45.tar.xz /drivers.txz
|
||||||
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
|
|
||||||
|
|
||||||
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
|
FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
|
||||||
FROM build-${TARGETARCH}
|
FROM build-${TARGETARCH}
|
||||||
|
|||||||
@@ -264,6 +264,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -443,16 +448,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>22</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>23</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>24</Order>
|
<Order>23</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
@@ -267,6 +267,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -446,16 +451,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>22</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>23</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>24</Order>
|
<Order>23</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
@@ -463,4 +463,3 @@
|
|||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
</unattend>
|
</unattend>
|
||||||
|
|
||||||
|
|||||||
@@ -267,6 +267,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -446,16 +451,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>22</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>23</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>24</Order>
|
<Order>23</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
@@ -267,6 +267,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -446,16 +451,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>22</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>23</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>24</Order>
|
<Order>23</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
@@ -267,6 +267,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>26</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -446,16 +451,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>22</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>23</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>24</Order>
|
<Order>23</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
@@ -159,6 +159,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -337,16 +342,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>21</Order>
|
<Order>21</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>22</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>23</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
@@ -162,6 +162,11 @@
|
|||||||
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
<Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 1 /f</Path>
|
||||||
<Description>Set Network Location to Home</Description>
|
<Description>Set Network Location to Home</Description>
|
||||||
</RunSynchronousCommand>
|
</RunSynchronousCommand>
|
||||||
|
<RunSynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Path>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</Path>
|
||||||
|
<Description>Install VirtIO display driver</Description>
|
||||||
|
</RunSynchronousCommand>
|
||||||
</RunSynchronous>
|
</RunSynchronous>
|
||||||
</component>
|
</component>
|
||||||
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
@@ -340,16 +345,11 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>21</Order>
|
<Order>21</Order>
|
||||||
<CommandLine>pnputil -i -a C:\Windows\Drivers\viogpudo\viogpudo.inf</CommandLine>
|
|
||||||
<Description>Install VirtIO display driver</Description>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>22</Order>
|
|
||||||
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
<CommandLine>cmd /C rd /q C:\Windows.old</CommandLine>
|
||||||
<Description>Remove empty Windows.old folder</Description>
|
<Description>Remove empty Windows.old folder</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<Order>23</Order>
|
<Order>22</Order>
|
||||||
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
<Description>Execute custom script from the OEM folder if exists</Description>
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
|
|||||||
283
assets/win7x64-enterprise-eval.xml
Normal file
283
assets/win7x64-enterprise-eval.xml
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DiskConfiguration>
|
||||||
|
<WillShowUI>OnError</WillShowUI>
|
||||||
|
<Disk wcm:action="add">
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<WillWipeDisk>true</WillWipeDisk>
|
||||||
|
<CreatePartitions>
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Size>100</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Extend>true</Extend>
|
||||||
|
</CreatePartition>
|
||||||
|
</CreatePartitions>
|
||||||
|
<ModifyPartitions>
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<Label>System Reserved</Label>
|
||||||
|
<Order>1</Order>
|
||||||
|
<Active>true</Active>
|
||||||
|
<PartitionID>1</PartitionID>
|
||||||
|
<TypeID>0x27</TypeID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Active>true</Active>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<Label>Windows</Label>
|
||||||
|
<Letter>C</Letter>
|
||||||
|
<Order>2</Order>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
</ModifyPartition>
|
||||||
|
</ModifyPartitions>
|
||||||
|
</Disk>
|
||||||
|
</DiskConfiguration>
|
||||||
|
<ImageInstall>
|
||||||
|
<OSImage>
|
||||||
|
<InstallFrom>
|
||||||
|
<MetaData wcm:action="add">
|
||||||
|
<Value>Windows 7 Enterprise</Value>
|
||||||
|
<Key>/IMAGE/NAME</Key>
|
||||||
|
</MetaData>
|
||||||
|
</InstallFrom>
|
||||||
|
<InstallTo>
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
</InstallTo>
|
||||||
|
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||||
|
</OSImage>
|
||||||
|
</ImageInstall>
|
||||||
|
<DynamicUpdate>
|
||||||
|
<Enable>true</Enable>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</DynamicUpdate>
|
||||||
|
<UpgradeData>
|
||||||
|
<Upgrade>false</Upgrade>
|
||||||
|
<WillShowUI>Never</WillShowUI>
|
||||||
|
</UpgradeData>
|
||||||
|
<UserData>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
<FullName>Docker</FullName>
|
||||||
|
<Organization>Windows for Docker</Organization>
|
||||||
|
</UserData>
|
||||||
|
<EnableFirewall>false</EnableFirewall>
|
||||||
|
<Diagnostics>
|
||||||
|
<OptIn>false</OptIn>
|
||||||
|
</Diagnostics>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="offlineServicing">
|
||||||
|
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<EnableLUA>false</EnableLUA>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component name="Microsoft-Windows-PnPSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<ComputerName>*</ComputerName>
|
||||||
|
<OEMInformation>
|
||||||
|
<Manufacturer>Dockur</Manufacturer>
|
||||||
|
<Model>Windows for Docker</Model>
|
||||||
|
</OEMInformation>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-ErrorReportingCore" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableWER>1</DisableWER>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>https://google.com</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableAccelerators>true</DisableAccelerators>
|
||||||
|
<DisableFirstRunWizard>true</DisableFirstRunWizard>
|
||||||
|
<Home_Page>https://google.com</Home_Page>
|
||||||
|
<Help_Page>about:blank</Help_Page>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<CEIPEnabled>0</CEIPEnabled>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DisableSR>1</DisableSR>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<InputLocale>0409:00000409</InputLocale>
|
||||||
|
<SystemLocale>en-US</SystemLocale>
|
||||||
|
<UILanguage>en-US</UILanguage>
|
||||||
|
<UserLocale>en-US</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<fDenyTSConnections>false</fDenyTSConnections>
|
||||||
|
</component>
|
||||||
|
<component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAuthentication>0</UserAuthentication>
|
||||||
|
</component>
|
||||||
|
<component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<FirewallGroups>
|
||||||
|
<FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
|
||||||
|
<Active>true</Active>
|
||||||
|
<Profile>all</Profile>
|
||||||
|
<Group>@FirewallAPI.dll,-28752</Group>
|
||||||
|
</FirewallGroup>
|
||||||
|
</FirewallGroups>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<UserAccounts>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Name>Docker</Name>
|
||||||
|
<Group>Administrators</Group>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>password</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
</UserAccounts>
|
||||||
|
<AutoLogon>
|
||||||
|
<Username>Docker</Username>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<LogonCount>65432</LogonCount>
|
||||||
|
<Password>
|
||||||
|
<Value />
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
</AutoLogon>
|
||||||
|
<Display>
|
||||||
|
<ColorDepth>32</ColorDepth>
|
||||||
|
<HorizontalResolution>1920</HorizontalResolution>
|
||||||
|
<VerticalResolution>1080</VerticalResolution>
|
||||||
|
</Display>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Home</NetworkLocation>
|
||||||
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
|
<SkipUserOOBE>true</SkipUserOOBE>
|
||||||
|
<SkipMachineOOBE>true</SkipMachineOOBE>
|
||||||
|
</OOBE>
|
||||||
|
<RegisteredOrganization>Dockur</RegisteredOrganization>
|
||||||
|
<RegisteredOwner>Windows for Docker</RegisteredOwner>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v "AllowInsecureGuestAuth" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Allow guest access to network shares</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LimitBlankPasswordUse /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Allow RDP login with blank password</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<CommandLine>cmd /C wmic useraccount where name="Docker" set PasswordExpires=false</CommandLine>
|
||||||
|
<Description>Password Never Expires</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -H OFF</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>5</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -X -monitor-timeout-ac 0</CommandLine>
|
||||||
|
<Description>Disable monitor blanking</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>6</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f</CommandLine>
|
||||||
|
<Description>Disable Network Discovery popup</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>7</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Network\NetworkLocationWizard" /v "HideWizard" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Disable Network Discovery popup</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<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>
|
||||||
|
<Description>Disable first-run experience in Edge</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>10</Order>
|
||||||
|
<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>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>11</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateFileSizePercent" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Zero Hibernation File</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>12</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabled" /t REG_DWORD /d 0 /f</CommandLine>
|
||||||
|
<Description>Disable Hibernation</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>13</Order>
|
||||||
|
<CommandLine>cmd /C POWERCFG -X -standby-timeout-ac 0</CommandLine>
|
||||||
|
<Description>Disable Sleep</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>14</Order>
|
||||||
|
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "fAllowUnlistedRemotePrograms" /t REG_DWORD /d 1 /f</CommandLine>
|
||||||
|
<Description>Enable RemoteAPP to launch unlisted programs</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>15</Order>
|
||||||
|
<CommandLine>netsh advfirewall firewall set rule group="@FirewallAPI.dll,-32752" new enable=Yes</CommandLine>
|
||||||
|
<Description>Enable Network Discovery</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>16</Order>
|
||||||
|
<CommandLine>netsh advfirewall firewall set rule group="@FirewallAPI.dll,-28502" new enable=Yes</CommandLine>
|
||||||
|
<Description>Enable File Sharing</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<Order>17</Order>
|
||||||
|
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
|
||||||
|
<Description>Execute custom script from the OEM folder if exists</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
</unattend>
|
||||||
@@ -6,10 +6,14 @@ services:
|
|||||||
VERSION: "11"
|
VERSION: "11"
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
|
- /dev/net/tun
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
- 8006:8006
|
- 8006:8006
|
||||||
- 3389:3389/tcp
|
- 3389:3389/tcp
|
||||||
- 3389:3389/udp
|
- 3389:3389/udp
|
||||||
|
volumes:
|
||||||
|
- ./windows:/storage
|
||||||
|
restart: always
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
|
|||||||
102
kubernetes.yml
102
kubernetes.yml
@@ -1,74 +1,100 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: windows-pvc
|
name: windows-pvc
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 64Gi
|
storage: 64Gi
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: Pod
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: windows
|
name: windows
|
||||||
labels:
|
labels:
|
||||||
name: windows
|
name: windows
|
||||||
spec:
|
spec:
|
||||||
terminationGracePeriodSeconds: 120 # the Kubernetes default is 30 seconds and it may be not enough
|
replicas: 1
|
||||||
containers:
|
selector:
|
||||||
- name: windows
|
matchLabels:
|
||||||
image: dockurr/windows
|
app: windows
|
||||||
ports:
|
template:
|
||||||
- containerPort: 8006
|
metadata:
|
||||||
protocol: TCP
|
labels:
|
||||||
- containerPort: 3389
|
app: windows
|
||||||
protocol: TCP
|
spec:
|
||||||
- containerPort: 3389
|
containers:
|
||||||
protocol: UDP
|
- name: windows
|
||||||
securityContext:
|
image: dockurr/windows
|
||||||
privileged: true
|
env:
|
||||||
env:
|
|
||||||
- name: VERSION
|
- name: VERSION
|
||||||
value: "11"
|
value: "11"
|
||||||
- name: RAM_SIZE
|
|
||||||
value: "4G"
|
|
||||||
- name: CPU_CORES
|
|
||||||
value: "2"
|
|
||||||
- name: DISK_SIZE
|
- name: DISK_SIZE
|
||||||
value: "64G"
|
value: "64G"
|
||||||
volumeMounts:
|
ports:
|
||||||
|
- containerPort: 8006
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 3389
|
||||||
|
name: rdp
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 3389
|
||||||
|
name: udp
|
||||||
|
protocol: UDP
|
||||||
|
- containerPort: 5900
|
||||||
|
name: vnc
|
||||||
|
protocol: TCP
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- NET_ADMIN
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
- mountPath: /storage
|
- mountPath: /storage
|
||||||
name: storage
|
name: storage
|
||||||
- mountPath: /dev/kvm
|
- mountPath: /dev/kvm
|
||||||
name: dev-kvm
|
name: dev-kvm
|
||||||
volumes:
|
- mountPath: /dev/net/tun
|
||||||
- name: storage
|
name: dev-tun
|
||||||
persistentVolumeClaim:
|
terminationGracePeriodSeconds: 120
|
||||||
claimName: windows-pvc
|
volumes:
|
||||||
- name: dev-kvm
|
- name: storage
|
||||||
hostPath:
|
persistentVolumeClaim:
|
||||||
path: /dev/kvm
|
claimName: windows-pvc
|
||||||
|
- hostPath:
|
||||||
|
path: /dev/kvm
|
||||||
|
name: dev-kvm
|
||||||
|
- hostPath:
|
||||||
|
path: /dev/net/tun
|
||||||
|
type: CharDevice
|
||||||
|
name: dev-tun
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: windows
|
name: windows
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
internalTrafficPolicy: Cluster
|
||||||
selector:
|
|
||||||
name: windows
|
|
||||||
ports:
|
ports:
|
||||||
- name: tcp-8006
|
- name: http
|
||||||
protocol: TCP
|
|
||||||
port: 8006
|
port: 8006
|
||||||
targetPort: 8006
|
|
||||||
- name: tcp-3389
|
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
targetPort: 8006
|
||||||
|
- name: rdp
|
||||||
port: 3389
|
port: 3389
|
||||||
|
protocol: TCP
|
||||||
targetPort: 3389
|
targetPort: 3389
|
||||||
- name: udp-3389
|
- name: udp
|
||||||
|
port: 3389
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
port: 3389
|
|
||||||
targetPort: 3389
|
targetPort: 3389
|
||||||
|
- name: vnc
|
||||||
|
port: 5900
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 5900
|
||||||
|
selector:
|
||||||
|
app: windows
|
||||||
|
type: ClusterIP
|
||||||
|
|||||||
66
readme.md
66
readme.md
@@ -37,19 +37,23 @@ services:
|
|||||||
VERSION: "11"
|
VERSION: "11"
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
|
- /dev/net/tun
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
- 8006:8006
|
- 8006:8006
|
||||||
- 3389:3389/tcp
|
- 3389:3389/tcp
|
||||||
- 3389:3389/udp
|
- 3389:3389/udp
|
||||||
|
volumes:
|
||||||
|
- ./windows:/storage
|
||||||
|
restart: always
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
```
|
```
|
||||||
|
|
||||||
Via Docker CLI:
|
Via Docker CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
|
docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/windows:/storage --stop-timeout 120 dockurr/windows
|
||||||
```
|
```
|
||||||
|
|
||||||
Via Kubernetes:
|
Via Kubernetes:
|
||||||
@@ -84,7 +88,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I select the Windows version?
|
### How do I select the Windows version?
|
||||||
|
|
||||||
By default, Windows 11 will be installed. But you can add the `VERSION` environment variable to your compose file, in order to specify an alternative Windows version to be downloaded:
|
By default, Windows 11 Pro will be installed. But you can add the `VERSION` environment variable to your compose file, in order to specify an alternative Windows version to be downloaded:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -96,8 +100,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
| **Value** | **Version** | **Size** |
|
| **Value** | **Version** | **Size** |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `11` | Windows 11 Pro | 5.4 GB |
|
| `11` | Windows 11 Pro | 5.4 GB |
|
||||||
| `11l` | Windows 11 LTSC | 4.2 GB |
|
| `11l` | Windows 11 LTSC | 4.7 GB |
|
||||||
| `11e` | Windows 11 Enterprise | 5.8 GB |
|
| `11e` | Windows 11 Enterprise | 4.0 GB |
|
||||||
||||
|
||||
|
||||||
| `10` | Windows 10 Pro | 5.7 GB |
|
| `10` | Windows 10 Pro | 5.7 GB |
|
||||||
| `10l` | Windows 10 LTSC | 4.6 GB |
|
| `10l` | Windows 10 LTSC | 4.6 GB |
|
||||||
@@ -108,7 +112,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
| `ve` | Windows Vista Enterprise | 3.0 GB |
|
| `ve` | Windows Vista Enterprise | 3.0 GB |
|
||||||
| `xp` | Windows XP Professional | 0.6 GB |
|
| `xp` | Windows XP Professional | 0.6 GB |
|
||||||
||||
|
||||
|
||||||
| `2025` | Windows Server 2025 | 5.0 GB |
|
| `2025` | Windows Server 2025 | 5.6 GB |
|
||||||
| `2022` | Windows Server 2022 | 4.7 GB |
|
| `2022` | Windows Server 2022 | 4.7 GB |
|
||||||
| `2019` | Windows Server 2019 | 5.3 GB |
|
| `2019` | Windows Server 2019 | 5.3 GB |
|
||||||
| `2016` | Windows Server 2016 | 6.5 GB |
|
| `2016` | Windows Server 2016 | 6.5 GB |
|
||||||
@@ -125,10 +129,10 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /var/win:/storage
|
- ./windows:/storage
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace the example path `/var/win` with the desired storage folder.
|
Replace the example path `./windows` with the desired storage folder or named volume.
|
||||||
|
|
||||||
### How do I change the size of the disk?
|
### How do I change the size of the disk?
|
||||||
|
|
||||||
@@ -144,21 +148,23 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I share files with the host?
|
### How do I share files with the host?
|
||||||
|
|
||||||
Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`. Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file:
|
Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`.
|
||||||
|
|
||||||
|
Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /home/user/example:/data
|
- ./example:/data
|
||||||
```
|
```
|
||||||
|
|
||||||
The example folder `/home/user/example` will be available as ` \\host.lan\Data`.
|
The example folder `./example` will be available as ` \\host.lan\Data`.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> You can map this path to a drive letter in Windows, for easier access.
|
> You can map this path to a drive letter in Windows, for easier access.
|
||||||
|
|
||||||
### How do I install a custom image?
|
### How do I install a custom image?
|
||||||
|
|
||||||
In order to download an unsupported ISO image that is not selectable from the list above, specify the URL of that ISO in the `VERSION` environment variable, for example:
|
In order to download an unsupported ISO image, specify its URL in the `VERSION` environment variable:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -169,21 +175,23 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /home/user/example.iso:/custom.iso
|
- ./example.iso:/custom.iso
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace the example path `/home/user/example.iso` with the filename of your desired ISO file, the value of `VERSION` will be ignored in this case.
|
Replace the example path `./example.iso` with the filename of your desired ISO file. The value of `VERSION` will be ignored in this case.
|
||||||
|
|
||||||
### How do I run a script after installation?
|
### How do I run a script after installation?
|
||||||
|
|
||||||
To run your own script after installation, you can create a file called `install.bat` and place it in a folder together with any additional files it needs (software to be installed for example). Then bind that folder in your compose file like this:
|
To run your own script after installation, you can create a file called `install.bat` and place it in a folder together with any additional files it needs (software to be installed for example).
|
||||||
|
|
||||||
|
Then bind that folder in your compose file like this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
volumes:
|
volumes:
|
||||||
- /home/user/example:/oem
|
- ./example:/oem
|
||||||
```
|
```
|
||||||
|
|
||||||
The example folder `/home/user/example` will be copied to `C:\OEM` during installation and the containing `install.bat` will be executed during the last step.
|
The example folder `./example` will be copied to `C:\OEM` and the containing `install.bat` will be executed during the last step of the automatic installation.
|
||||||
|
|
||||||
### How do I perform a manual installation?
|
### How do I perform a manual installation?
|
||||||
|
|
||||||
@@ -210,9 +218,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I configure the username and password?
|
### How do I configure the username and password?
|
||||||
|
|
||||||
By default, a user called `Docker` is created during the installation, with an empty password.
|
By default, a user called `Docker` (with an empty password) is created during installation.
|
||||||
|
|
||||||
If you want to use different credentials, you can change them in your compose file:
|
If you want to use different credentials, you can configure them (only BEFORE installation) in your compose file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -222,7 +230,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I select the Windows language?
|
### How do I select the Windows language?
|
||||||
|
|
||||||
By default, the English version of Windows will be downloaded. But you can add the `LANGUAGE` environment variable to your compose file, in order to specify an alternative language:
|
By default, the English version of Windows will be downloaded.
|
||||||
|
|
||||||
|
But before installation you can add the `LANGUAGE` environment variable to your compose file, in order to specify an alternative language:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -233,7 +243,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
### How do I select the keyboard layout?
|
### How do I select the keyboard layout?
|
||||||
|
|
||||||
If you want to use a keyboard layout or locale that is not the default for your selected language, you can add the `KEYBOARD` and `REGION` variables with a culture code, like this:
|
If you want to use a keyboard layout or locale that is not the default for your selected language, before installation you can add `KEYBOARD` and `REGION` variables like this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -241,10 +251,6 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
KEYBOARD: "en-US"
|
KEYBOARD: "en-US"
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Changing these values will have no effect after the installation has been performed already. Use the control panel inside Windows in that case.
|
|
||||||
>
|
|
||||||
|
|
||||||
### How do I connect using RDP?
|
### How do I connect using RDP?
|
||||||
|
|
||||||
The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.
|
The web-viewer is mainly meant to be used during installation, as its picture quality is low, and it has no audio or clipboard for example.
|
||||||
@@ -294,7 +300,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
|
|
||||||
After configuring the container for [macvlan](#how-do-i-assign-an-individual-ip-address-to-the-container), it is possible for Windows to become part of your home network by requesting an IP from your router, just like a real PC.
|
After configuring the container for [macvlan](#how-do-i-assign-an-individual-ip-address-to-the-container), it is possible for Windows to become part of your home network by requesting an IP from your router, just like a real PC.
|
||||||
|
|
||||||
To enable this mode, add the following lines to your compose file:
|
To enable this mode, in which the container and Windows will have separate IP addresses, add the following lines to your compose file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -305,9 +311,6 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
- 'c *:* rwm'
|
- 'c *:* rwm'
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> In this mode, the container and Windows will each have their own separate IPs.
|
|
||||||
|
|
||||||
### How do I add multiple disks?
|
### How do I add multiple disks?
|
||||||
|
|
||||||
To create additional disks, modify your compose file like this:
|
To create additional disks, modify your compose file like this:
|
||||||
@@ -317,8 +320,8 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
DISK2_SIZE: "32G"
|
DISK2_SIZE: "32G"
|
||||||
DISK3_SIZE: "64G"
|
DISK3_SIZE: "64G"
|
||||||
volumes:
|
volumes:
|
||||||
- /home/example:/storage2
|
- ./example2:/storage2
|
||||||
- /mnt/data/example:/storage3
|
- ./example3:/storage3
|
||||||
```
|
```
|
||||||
|
|
||||||
### How do I pass-through a disk?
|
### How do I pass-through a disk?
|
||||||
@@ -344,8 +347,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
|||||||
- /dev/bus/usb
|
- /dev/bus/usb
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!IMPORTANT]
|
If the device is a USB disk drive, please wait until after the installation is fully completed before connecting it. Otherwise the installation may fail, as the order of the disks can get rearranged.
|
||||||
> If the device is a USB disk drive, please wait until after the installation is completed before connecting it. Otherwise the installation may fail, as the order of the disks can get rearranged.
|
|
||||||
|
|
||||||
### How do I verify if my system supports KVM?
|
### How do I verify if my system supports KVM?
|
||||||
|
|
||||||
|
|||||||
1031
src/define.sh
1031
src/define.sh
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
: "${APP:="Windows"}"
|
||||||
: "${BOOT_MODE:="windows"}"
|
: "${BOOT_MODE:="windows"}"
|
||||||
|
: "${SUPPORT:="https://github.com/dockur/windows"}"
|
||||||
APP="Windows"
|
|
||||||
SUPPORT="https://github.com/dockur/windows"
|
|
||||||
|
|
||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ startInstall() {
|
|||||||
|
|
||||||
BOOT="$STORAGE/$file"
|
BOOT="$STORAGE/$file"
|
||||||
|
|
||||||
! migrateFiles "$BOOT" "$VERSION" && error "Migration failed!" && exit 57
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
skipInstall "$BOOT" && return 1
|
skipInstall "$BOOT" && return 1
|
||||||
@@ -202,10 +200,16 @@ abortInstall() {
|
|||||||
detectCustom() {
|
detectCustom() {
|
||||||
|
|
||||||
local file base
|
local file base
|
||||||
|
local fname="custom.iso"
|
||||||
|
|
||||||
CUSTOM=""
|
CUSTOM=""
|
||||||
|
|
||||||
file=$(find / -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
if [ -d "/$fname" ]; then
|
||||||
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
error "The file /$fname has an invalid path!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
||||||
|
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" | head -n 1)
|
||||||
|
|
||||||
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
|
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
|
||||||
base=$(basename "$VERSION")
|
base=$(basename "$VERSION")
|
||||||
@@ -489,6 +493,10 @@ setXML() {
|
|||||||
|
|
||||||
local file="/custom.xml"
|
local file="/custom.xml"
|
||||||
|
|
||||||
|
if [ -d "$file" ]; then
|
||||||
|
warn "The file $file has an invalid path!"
|
||||||
|
fi
|
||||||
|
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"
|
||||||
@@ -668,6 +676,11 @@ updateXML() {
|
|||||||
sed -z "s/<AdministratorPassword>...............<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset"
|
sed -z "s/<AdministratorPassword>...............<Value \/>/<AdministratorPassword>\n <Value>$admin<\/Value>/g" -i "$asset"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$EDITION" ]; then
|
||||||
|
[[ "${EDITION^^}" == "CORE" ]] && EDITION="STANDARDCORE"
|
||||||
|
sed -i "s/SERVERSTANDARD<\/Value>/SERVER${EDITION^^}<\/Value>/g" "$asset"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,8 +690,13 @@ addDriver() {
|
|||||||
local path="$2"
|
local path="$2"
|
||||||
local target="$3"
|
local target="$3"
|
||||||
local driver="$4"
|
local driver="$4"
|
||||||
|
local desc=""
|
||||||
local folder=""
|
local folder=""
|
||||||
|
|
||||||
|
if [ -z "$id" ]; then
|
||||||
|
warn "no Windows version specified for \"$driver\" driver!" && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"win7x86"* ) folder="w7/x86" ;;
|
"win7x86"* ) folder="w7/x86" ;;
|
||||||
"win7x64"* ) folder="w7/amd64" ;;
|
"win7x64"* ) folder="w7/amd64" ;;
|
||||||
@@ -698,7 +716,8 @@ addDriver() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -z "$folder" ]; then
|
if [ -z "$folder" ]; then
|
||||||
warn "no \"$driver\" driver found for \"$DETECTED\" !" && return 0
|
desc=$(printVersion "$id" "$id")
|
||||||
|
warn "no \"$driver\" driver available for \"$desc\" !" && return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -d "$path/$driver/$folder" ] && return 0
|
[ ! -d "$path/$driver/$folder" ] && return 0
|
||||||
@@ -731,6 +750,11 @@ addDrivers() {
|
|||||||
local msg="Adding drivers to image..."
|
local msg="Adding drivers to image..."
|
||||||
info "$msg" && html "$msg"
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
|
if [ -z "$version" ]; then
|
||||||
|
version="win11x64"
|
||||||
|
warn "Windows version unknown, falling back to Windows 11 drivers..."
|
||||||
|
fi
|
||||||
|
|
||||||
if ! bsdtar -xf /drivers.txz -C "$drivers"; then
|
if ! bsdtar -xf /drivers.txz -C "$drivers"; then
|
||||||
error "Failed to extract drivers from archive!" && return 1
|
error "Failed to extract drivers from archive!" && return 1
|
||||||
fi
|
fi
|
||||||
@@ -982,44 +1006,10 @@ bootWindows() {
|
|||||||
|
|
||||||
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
|
if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then
|
||||||
BOOT_MODE=$(<"$STORAGE/windows.mode")
|
BOOT_MODE=$(<"$STORAGE/windows.mode")
|
||||||
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
|
||||||
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Migrations
|
if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then
|
||||||
|
[[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old")
|
||||||
[[ "${PLATFORM,,}" != "x64" ]] && return 0
|
|
||||||
|
|
||||||
if [ -f "$STORAGE/windows.old" ]; then
|
|
||||||
MACHINE=$(<"$STORAGE/windows.old")
|
|
||||||
[ -z "$MACHINE" ] && MACHINE="q35"
|
|
||||||
BOOT_MODE="windows_legacy"
|
|
||||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
local creation="1.10"
|
|
||||||
local minimal="2.14"
|
|
||||||
|
|
||||||
if [ -f "$STORAGE/windows.ver" ]; then
|
|
||||||
creation=$(<"$STORAGE/windows.ver")
|
|
||||||
[[ "${creation}" != *"."* ]] && creation="$minimal"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Force secure boot on installs created prior to v2.14
|
|
||||||
if (( $(echo "$creation < $minimal" | bc -l) )); then
|
|
||||||
if [[ "${BOOT_MODE,,}" == "windows" ]]; then
|
|
||||||
BOOT_MODE="windows_secure"
|
|
||||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
|
||||||
if [ -f "$STORAGE/windows.rom" ] && [ ! -f "$STORAGE/$BOOT_MODE.rom" ]; then
|
|
||||||
mv -f "$STORAGE/windows.rom" "$STORAGE/$BOOT_MODE.rom"
|
|
||||||
fi
|
|
||||||
if [ -f "$STORAGE/windows.vars" ] && [ ! -f "$STORAGE/$BOOT_MODE.vars" ]; then
|
|
||||||
mv -f "$STORAGE/windows.vars" "$STORAGE/$BOOT_MODE.vars"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
96
src/mido.sh
96
src/mido.sh
@@ -4,25 +4,26 @@ set -Eeuo pipefail
|
|||||||
handle_curl_error() {
|
handle_curl_error() {
|
||||||
|
|
||||||
local error_code="$1"
|
local error_code="$1"
|
||||||
|
local server_name="$2"
|
||||||
|
|
||||||
case "$error_code" in
|
case "$error_code" in
|
||||||
1) error "Unsupported protocol!" ;;
|
1) error "Unsupported protocol!" ;;
|
||||||
2) error "Failed to initialize curl!" ;;
|
2) error "Failed to initialize curl!" ;;
|
||||||
3) error "The URL format is malformed!" ;;
|
3) error "The URL format is malformed!" ;;
|
||||||
5) error "Failed to resolve address of proxy host!" ;;
|
5) error "Failed to resolve address of proxy host!" ;;
|
||||||
6) error "Failed to resolve Microsoft servers! Is there an Internet connection?" ;;
|
6) error "Failed to resolve $server_name servers! Is there an Internet connection?" ;;
|
||||||
7) error "Failed to contact Microsoft servers! Is there an Internet connection or is the server down?" ;;
|
7) error "Failed to contact $server_name servers! Is there an Internet connection or is the server down?" ;;
|
||||||
8) error "Microsoft servers returned a malformed HTTP response!" ;;
|
8) error "$server_name servers returned a malformed HTTP response!" ;;
|
||||||
16) error "A problem was detected in the HTTP2 framing layer!" ;;
|
16) error "A problem was detected in the HTTP2 framing layer!" ;;
|
||||||
22) error "Microsoft servers returned a failing HTTP status code!" ;;
|
22) error "$server_name servers returned a failing HTTP status code!" ;;
|
||||||
23) error "Failed at writing Windows media to disk! Out of disk space or permission error?" ;;
|
23) error "Failed at writing Windows media to disk! Out of disk space or permission error?" ;;
|
||||||
26) error "Failed to read Windows media from disk!" ;;
|
26) error "Failed to read Windows media from disk!" ;;
|
||||||
27) error "Ran out of memory during download!" ;;
|
27) error "Ran out of memory during download!" ;;
|
||||||
28) error "Connection timed out to Microsoft server!" ;;
|
28) error "Connection timed out to $server_name server!" ;;
|
||||||
35) error "SSL connection error from Microsoft server!" ;;
|
35) error "SSL connection error from $server_name server!" ;;
|
||||||
36) error "Failed to continue earlier download!" ;;
|
36) error "Failed to continue earlier download!" ;;
|
||||||
52) error "Received no data from the Microsoft server!" ;;
|
52) error "Received no data from the $server_name server!" ;;
|
||||||
63) error "Microsoft servers returned an unexpectedly large response!" ;;
|
63) error "$server_name servers returned an unexpectedly large response!" ;;
|
||||||
# POSIX defines exit statuses 1-125 as usable by us
|
# POSIX defines exit statuses 1-125 as usable by us
|
||||||
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
|
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
|
||||||
$((error_code <= 125)))
|
$((error_code <= 125)))
|
||||||
@@ -100,7 +101,7 @@ download_windows() {
|
|||||||
# Remove "Accept" header that curl sends by default
|
# Remove "Accept" header that curl sends by default
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Parsing download page: ${url}"
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Parsing download page: ${url}"
|
||||||
download_page_html=$(curl --silent --max-time 30 --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url") || {
|
download_page_html=$(curl --silent --max-time 30 --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url") || {
|
||||||
handle_curl_error $?
|
handle_curl_error "$?" "Microsoft"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,14 +118,14 @@ download_windows() {
|
|||||||
# Permit Session ID
|
# Permit Session ID
|
||||||
curl --silent --max-time 30 --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || {
|
curl --silent --max-time 30 --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || {
|
||||||
# This should only happen if there's been some change to how this API works
|
# This should only happen if there's been some change to how this API works
|
||||||
handle_curl_error $?
|
handle_curl_error "$?" "Microsoft"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo -n "Getting language SKU ID: "
|
[[ "$DEBUG" == [Yy1]* ]] && echo -n "Getting language SKU ID: "
|
||||||
sku_url="https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=$profile&ProductEditionId=$product_edition_id&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id"
|
sku_url="https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=$profile&ProductEditionId=$product_edition_id&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id"
|
||||||
language_skuid_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$sku_url") || {
|
language_skuid_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$sku_url") || {
|
||||||
handle_curl_error $?
|
handle_curl_error "$?" "Microsoft"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ download_windows_eval() {
|
|||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Parsing download page: ${url}"
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Parsing download page: ${url}"
|
||||||
iso_download_page_html=$(curl --silent --max-time 30 --user-agent "$user_agent" --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url") || {
|
iso_download_page_html=$(curl --silent --max-time 30 --user-agent "$user_agent" --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url") || {
|
||||||
handle_curl_error $?
|
handle_curl_error "$?" "Microsoft"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,10 +242,10 @@ download_windows_eval() {
|
|||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Getting download link.."
|
[[ "$DEBUG" == [Yy1]* ]] && echo "Getting download link.."
|
||||||
|
|
||||||
if [[ "$enterprise_type" == "iot" ]]; then
|
filter="https://go.microsoft.com/fwlink/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country,,}"
|
||||||
filter="https://go.microsoft.com/fwlink/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country^^}"
|
|
||||||
else
|
if ! echo "$iso_download_page_html" | grep -io "$filter" > /dev/null; then
|
||||||
filter="https://go.microsoft.com/fwlink/p/?LinkID=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country^^}"
|
filter="https://go.microsoft.com/fwlink/p/?linkid=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${culture,,}&country=${country,,}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iso_download_links=$(echo "$iso_download_page_html" | grep -io "$filter") || {
|
iso_download_links=$(echo "$iso_download_page_html" | grep -io "$filter") || {
|
||||||
@@ -287,7 +288,7 @@ download_windows_eval() {
|
|||||||
|
|
||||||
iso_download_link=$(curl --silent --max-time 30 --user-agent "$user_agent" --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link") || {
|
iso_download_link=$(curl --silent --max-time 30 --user-agent "$user_agent" --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link") || {
|
||||||
# This should only happen if the Microsoft servers are down
|
# This should only happen if the Microsoft servers are down
|
||||||
handle_curl_error $?
|
handle_curl_error "$?" "Microsoft"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +310,7 @@ getWindows() {
|
|||||||
info "$msg" && html "$msg"
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
case "${version,,}" in
|
case "${version,,}" in
|
||||||
"win2008r2" | "win81${PLATFORM,,}-enterprise"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
"win2008r2" | "win7${PLATFORM,,}"* | "win81${PLATFORM,,}"* | "win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
||||||
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
||||||
error "No download in the $language language available for $edition!"
|
error "No download in the $language language available for $edition!"
|
||||||
MIDO_URL="" && return 1
|
MIDO_URL="" && return 1
|
||||||
@@ -337,58 +338,15 @@ getWindows() {
|
|||||||
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2016-eval" | "win2012r2-eval" )
|
"win2025-eval" | "win2022-eval" | "win2019-eval" | "win2016-eval" | "win2012r2-eval" )
|
||||||
download_windows_eval "$version" "$lang" "$edition" && return 0
|
download_windows_eval "$version" "$lang" "$edition" && return 0
|
||||||
;;
|
;;
|
||||||
"win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
"win7${PLATFORM,,}"* | "win81${PLATFORM,,}-enterprise"* | "win2008r2" )
|
||||||
;;
|
;;
|
||||||
* ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;;
|
* ) error "Invalid VERSION specified, value \"$version\" is not recognized!" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "${PLATFORM,,}" != "x64" ]]; then
|
MIDO_URL=$(getMido "$version" "$lang" "")
|
||||||
MIDO_URL=""
|
[ -z "$MIDO_URL" ] && return 1
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then
|
return 0
|
||||||
MIDO_URL=""
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "${version,,}" in
|
|
||||||
"win81${PLATFORM,,}-enterprise"* )
|
|
||||||
MIDO_URL="https://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win11${PLATFORM,,}-enterprise-iot"* | "win11${PLATFORM,,}-enterprise-ltsc"* )
|
|
||||||
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2025-eval" )
|
|
||||||
MIDO_URL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1.240331-1435.ge_release_SERVER_EVAL_x64FRE_en-us.iso"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2022-eval" )
|
|
||||||
MIDO_URL="https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2019-eval" )
|
|
||||||
MIDO_URL="https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2016-eval" )
|
|
||||||
MIDO_URL="https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2012r2-eval" )
|
|
||||||
MIDO_URL="https://download.microsoft.com/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
"win2008r2" )
|
|
||||||
MIDO_URL="https://download.microsoft.com/download/4/1/D/41DEA7E0-B30D-4012-A1E3-F24DC03BA1BB/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso"
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
MIDO_URL=""
|
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCatalog() {
|
getCatalog() {
|
||||||
@@ -518,7 +476,9 @@ verifyFile() {
|
|||||||
local check="$4"
|
local check="$4"
|
||||||
|
|
||||||
if [ -n "$size" ] && [[ "$total" != "$size" ]] && [[ "$size" != "0" ]]; then
|
if [ -n "$size" ] && [[ "$total" != "$size" ]] && [[ "$size" != "0" ]]; then
|
||||||
warn "The downloaded file has an unexpected size: $total bytes, while expected value was: $size bytes. Please report this at $SUPPORT/issues"
|
if [[ "$VERIFY" == [Yy1]* ]] || [[ "$DEBUG" == [Yy1]* ]]; then
|
||||||
|
warn "The downloaded file has a different size ( $total bytes) than expected ( $size bytes). Please report this at $SUPPORT/issues"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local hash=""
|
local hash=""
|
||||||
@@ -541,7 +501,7 @@ verifyFile() {
|
|||||||
info "Succesfully verified ISO!" && return 0
|
info "Succesfully verified ISO!" && return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
error "The downloaded file has an invalid $algo checksum: $hash , while expected value was: $check. Please report this at $SUPPORT/issues"
|
error "The downloaded file has an unknown $algo checksum: $hash , as the expected value was: $check. Please report this at $SUPPORT/issues"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +560,7 @@ downloadFile() {
|
|||||||
msg="Failed to download $url"
|
msg="Failed to download $url"
|
||||||
(( rc == 3 )) && error "$msg , cannot write file (disk full?)" && return 1
|
(( rc == 3 )) && error "$msg , cannot write file (disk full?)" && return 1
|
||||||
(( rc == 4 )) && error "$msg , network failure!" && return 1
|
(( rc == 4 )) && error "$msg , network failure!" && return 1
|
||||||
(( rc == 8 )) && error "$msg , server issued an error response!" && return 1
|
(( rc == 8 )) && error "$msg , server issued an error response! Please report this at $SUPPORT/issues." && return 1
|
||||||
|
|
||||||
error "$msg , reason: $rc"
|
error "$msg , reason: $rc"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
15
src/samba.sh
15
src/samba.sh
@@ -71,6 +71,9 @@ addShare() {
|
|||||||
echo " guest account = nobody"
|
echo " guest account = nobody"
|
||||||
echo " map to guest = Bad User"
|
echo " map to guest = Bad User"
|
||||||
echo " server min protocol = NT1"
|
echo " server min protocol = NT1"
|
||||||
|
echo " follow symlinks = yes"
|
||||||
|
echo " wide links = yes"
|
||||||
|
echo " unix extensions = no"
|
||||||
echo ""
|
echo ""
|
||||||
echo " # disable printing services"
|
echo " # disable printing services"
|
||||||
echo " load printers = no"
|
echo " load printers = no"
|
||||||
@@ -89,6 +92,18 @@ addShare "$share" "Data" "Shared" || error "Failed to create shared folder!"
|
|||||||
[ -d "/data2" ] && addShare "/data2" "Data2" "Shared"
|
[ -d "/data2" ] && addShare "/data2" "Data2" "Shared"
|
||||||
[ -d "/data3" ] && addShare "/data3" "Data3" "Shared"
|
[ -d "/data3" ] && addShare "/data3" "Data3" "Shared"
|
||||||
|
|
||||||
|
IFS=',' read -r -a dirs <<< "${SHARES:-}"
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
[ ! -d "$dir" ] && continue
|
||||||
|
dir_name=$(basename "$dir")
|
||||||
|
addShare "$dir" "$dir_name" "Shared $dir_name" || error "Failed to create shared folder for $dir!"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Fix Samba permissions
|
||||||
|
[ -d /run/samba/msg.lock ] && chmod -R 0755 /run/samba/msg.lock
|
||||||
|
[ -d /var/log/samba/cores ] && chmod -R 0700 /var/log/samba/cores
|
||||||
|
[ -d /var/cache/samba/msg.lock ] && chmod -R 0755 /var/cache/samba/msg.lock
|
||||||
|
|
||||||
if ! smbd; then
|
if ! smbd; then
|
||||||
error "Samba daemon failed to start!"
|
error "Samba daemon failed to start!"
|
||||||
smbd -i --debug-stdout || true
|
smbd -i --debug-stdout || true
|
||||||
|
|||||||
Reference in New Issue
Block a user