mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
Compare commits
28 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11a19f6a9d | ||
|
|
544501107a | ||
|
|
122d1ff98e | ||
|
|
c1c44c4da7 | ||
|
|
f661df3abc | ||
|
|
a0bcd719be | ||
|
|
9236127a86 | ||
|
|
fa606aec53 | ||
|
|
8790b4ec7c | ||
|
|
e3cf3ccf3d | ||
|
|
b244fa544f | ||
|
|
4cb7e1074f | ||
|
|
ac106067bd | ||
|
|
0e95680704 | ||
|
|
5476760551 | ||
|
|
0caa4d76b8 | ||
|
|
4e0a29605b | ||
|
|
c3ba25bfb7 | ||
|
|
10449a3d29 | ||
|
|
b998cd4c7f | ||
|
|
6f84823117 | ||
|
|
c997bf7765 | ||
|
|
c6a8c0b702 | ||
|
|
f1ea8ee227 | ||
|
|
0ab3198ded | ||
|
|
42a149d7b9 | ||
|
|
0b0de7de14 | ||
|
|
8472d700dc |
35 changed files with 722 additions and 87 deletions
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"name": "windows",
|
|
||||||
"service": "windows",
|
|
||||||
"forwardPorts": [8006],
|
|
||||||
"dockerComposeFile": ".github/codespaces.yml"
|
|
||||||
}
|
|
||||||
20
.devcontainer/010 - Windows 11 Enterprise/devcontainer.json
Normal file
20
.devcontainer/010 - Windows 11 Enterprise/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 11 Enterprise",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "11e"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/020 - Windows 11 LTSC/devcontainer.json
Normal file
20
.devcontainer/020 - Windows 11 LTSC/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 11 LTSC",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "11l"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/030 - Windows 10 Pro/devcontainer.json
Normal file
20
.devcontainer/030 - Windows 10 Pro/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 10 Pro",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "10"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/040 - Windows 10 Enterprise/devcontainer.json
Normal file
20
.devcontainer/040 - Windows 10 Enterprise/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 10 Enterprise",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "10e"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/050 - Windows 10 LTSC/devcontainer.json
Normal file
20
.devcontainer/050 - Windows 10 LTSC/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 10 LTSC",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "10l"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/060 - Windows 8.1 Enterprise/devcontainer.json
Normal file
20
.devcontainer/060 - Windows 8.1 Enterprise/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 8.1 Enterprise",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "8e"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/070 - Windows 7 Ultimate/devcontainer.json
Normal file
20
.devcontainer/070 - Windows 7 Ultimate/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 7 Ultimate",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "7u"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/080 - Windows Vista Ultimate/devcontainer.json
Normal file
20
.devcontainer/080 - Windows Vista Ultimate/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Vista Ultimate",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "vu"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows XP Professional",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "xp"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 2000 Professional",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2k"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/110 - Windows Server 2025/devcontainer.json
Normal file
20
.devcontainer/110 - Windows Server 2025/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2025",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2025"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/120 - Windows Server 2022/devcontainer.json
Normal file
20
.devcontainer/120 - Windows Server 2022/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2022",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2022"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/130 - Windows Server 2019/devcontainer.json
Normal file
20
.devcontainer/130 - Windows Server 2019/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2019",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2019"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/140 - Windows Server 2016/devcontainer.json
Normal file
20
.devcontainer/140 - Windows Server 2016/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2016",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2016"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/150 - Windows Server 2012 R2/devcontainer.json
Normal file
20
.devcontainer/150 - Windows Server 2012 R2/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2012 R2",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2012"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/160 - Windows Server 2008 R2/devcontainer.json
Normal file
20
.devcontainer/160 - Windows Server 2008 R2/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2008 R2",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2008"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/170 - Windows Server 2003/devcontainer.json
Normal file
20
.devcontainer/170 - Windows Server 2003/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows Server 2003",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "2003"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/180 - Tiny11/devcontainer.json
Normal file
20
.devcontainer/180 - Tiny11/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Tiny11",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "tiny11"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/190 - Tiny11 Core/devcontainer.json
Normal file
20
.devcontainer/190 - Tiny11 Core/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Tiny11 Core",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "core11"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/200 - Tiny11 Nano/devcontainer.json
Normal file
20
.devcontainer/200 - Tiny11 Nano/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Tiny11 Nano",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "nano11"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
20
.devcontainer/210 - Tiny10/devcontainer.json
Normal file
20
.devcontainer/210 - Tiny10/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Tiny10",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "tiny10"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "../codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
services:
|
services:
|
||||||
windows:
|
windows:
|
||||||
image: dockurr/windows
|
|
||||||
container_name: windows
|
container_name: windows
|
||||||
|
image: ghcr.io/dockur/windows
|
||||||
environment:
|
environment:
|
||||||
VERSION: "11"
|
RAM_SIZE: "half"
|
||||||
RAM_SIZE: "max"
|
|
||||||
DISK_SIZE: "max"
|
DISK_SIZE: "max"
|
||||||
CPU_CORES: "max"
|
CPU_CORES: "max"
|
||||||
devices:
|
devices:
|
||||||
20
.devcontainer/devcontainer.json
Normal file
20
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"name": "Windows 11 Pro",
|
||||||
|
"service": "windows",
|
||||||
|
"containerEnv": {
|
||||||
|
"VERSION": "11"
|
||||||
|
},
|
||||||
|
"forwardPorts": [8006],
|
||||||
|
"portsAttributes": {
|
||||||
|
"8006": {
|
||||||
|
"label": "Web",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"otherPortsAttributes": {
|
||||||
|
"onAutoForward": "ignore"
|
||||||
|
},
|
||||||
|
"dockerComposeFile": "codespaces.yml",
|
||||||
|
"workspaceFolder": "/workspaces/windows",
|
||||||
|
"initializeCommand": "docker system prune --all --force"
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
.devcontainer
|
||||||
.git
|
.git
|
||||||
.github
|
.github
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
|
||||||
26
.github/workflows/check.yml
vendored
26
.github/workflows/check.yml
vendored
|
|
@ -7,19 +7,29 @@ jobs:
|
||||||
name: shellcheck
|
name: shellcheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
-
|
||||||
- name: Run ShellCheck
|
name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
-
|
||||||
|
name: Run ShellCheck
|
||||||
uses: ludeeus/action-shellcheck@master
|
uses: ludeeus/action-shellcheck@master
|
||||||
env:
|
env:
|
||||||
SHELLCHECK_OPTS: -x --source-path=src -e SC1091 -e SC2001 -e SC2002 -e SC2034 -e SC2064 -e SC2153 -e SC2317 -e SC2028
|
SHELLCHECK_OPTS: -x --source-path=src -e SC1091 -e SC2001 -e SC2002 -e SC2034 -e SC2064 -e SC2153 -e SC2317 -e SC2028
|
||||||
- name: Validate XML
|
-
|
||||||
uses: action-pack/valid-xml@v1
|
name: Lint Dockerfile
|
||||||
with:
|
|
||||||
path: "assets"
|
|
||||||
file-endings: ".xml"
|
|
||||||
- name: Lint Dockerfile
|
|
||||||
uses: hadolint/hadolint-action@v3.3.0
|
uses: hadolint/hadolint-action@v3.3.0
|
||||||
with:
|
with:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ignore: DL3006,DL3008
|
ignore: DL3006,DL3008
|
||||||
failure-threshold: warning
|
failure-threshold: warning
|
||||||
|
-
|
||||||
|
name: Validate XML
|
||||||
|
uses: action-pack/valid-xml@v1
|
||||||
|
with:
|
||||||
|
path: "assets"
|
||||||
|
file-endings: ".xml"
|
||||||
|
-
|
||||||
|
name: Validate JSON and YML files
|
||||||
|
uses: GrantBirki/json-yaml-validate@v4
|
||||||
|
with:
|
||||||
|
yaml_exclude_regex: ".*\\kubernetes\\.yml$"
|
||||||
|
|
|
||||||
66
.github/workflows/review.yml
vendored
Normal file
66
.github/workflows/review.yml
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
name: "Review"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
review:
|
||||||
|
name: review
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
-
|
||||||
|
name: Spelling
|
||||||
|
uses: reviewdog/action-misspell@v1
|
||||||
|
with:
|
||||||
|
locale: "US"
|
||||||
|
level: warning
|
||||||
|
pattern: |
|
||||||
|
*.md
|
||||||
|
*.sh
|
||||||
|
reporter: github-pr-review
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Hadolint
|
||||||
|
uses: reviewdog/action-hadolint@v1
|
||||||
|
with:
|
||||||
|
level: warning
|
||||||
|
reporter: github-pr-review
|
||||||
|
hadolint_ignore: DL3006 DL3008
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
-
|
||||||
|
name: YamlLint
|
||||||
|
uses: reviewdog/action-yamllint@v1
|
||||||
|
with:
|
||||||
|
level: warning
|
||||||
|
reporter: github-pr-review
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
-
|
||||||
|
name: ActionLint
|
||||||
|
uses: reviewdog/action-actionlint@v1
|
||||||
|
with:
|
||||||
|
level: warning
|
||||||
|
reporter: github-pr-review
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Shellformat
|
||||||
|
uses: reviewdog/action-shfmt@v1
|
||||||
|
with:
|
||||||
|
level: warning
|
||||||
|
shfmt_flags: "-i 2 -ci -bn"
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Shellcheck
|
||||||
|
uses: reviewdog/action-shellcheck@v1
|
||||||
|
with:
|
||||||
|
level: warning
|
||||||
|
reporter: github-pr-review
|
||||||
|
shellcheck_flags: -x -e SC1091 -e SC2001 -e SC2002 -e SC2034 -e SC2064 -e SC2153 -e SC2317 -e SC2028
|
||||||
|
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
ARG VERSION_ARG="latest"
|
ARG VERSION_ARG="latest"
|
||||||
FROM scratch AS build-amd64
|
FROM scratch AS build-amd64
|
||||||
|
|
||||||
COPY --from=qemux/qemu:7.24 / /
|
COPY --from=qemux/qemu:7.27 / /
|
||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
|
|
@ -19,7 +19,7 @@ RUN set -eu && \
|
||||||
cabextract \
|
cabextract \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
libarchive-tools && \
|
libarchive-tools && \
|
||||||
wget "https://github.com/gershnik/wsdd-native/releases/download/v1.21/wsddn_1.21_${TARGETARCH}.deb" -O /tmp/wsddn.deb -q && \
|
wget "https://github.com/gershnik/wsdd-native/releases/download/v1.22/wsddn_1.22_${TARGETARCH}.deb" -O /tmp/wsddn.deb -q && \
|
||||||
dpkg -i /tmp/wsddn.deb && \
|
dpkg -i /tmp/wsddn.deb && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
@ -27,7 +27,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=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.47-0/virtio-win-1.9.47.tar.xz /var/drivers.txz
|
ADD --chmod=664 https://github.com/qemus/virtiso-whql/releases/download/v1.9.48-0/virtio-win-1.9.48.tar.xz /var/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}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ services:
|
||||||
##### Via Docker CLI:
|
##### Via Docker CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
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
|
docker run -it --rm --name windows -e "VERSION=11" -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v "${PWD:-.}/windows:/storage" --stop-timeout 120 docker.io/dockurr/windows
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Via Kubernetes:
|
##### Via Kubernetes:
|
||||||
|
|
|
||||||
|
|
@ -1108,14 +1108,14 @@ getLink4() {
|
||||||
url="nano11_25h2/nano11%2025h2.iso"
|
url="nano11_25h2/nano11%2025h2.iso"
|
||||||
;;
|
;;
|
||||||
"core11" )
|
"core11" )
|
||||||
size=2159738880
|
size=3176654848
|
||||||
sum="78f0f44444ff95b97125b43e560a72e0d6ce0a665cf9f5573bf268191e5510c1"
|
sum="29c055fcfb7b089abd9e007e7abe4bb82c70a03aac9d65e56a38b87ab32d04d2"
|
||||||
url="tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso"
|
url="tiny11_25H2/tiny11core_25H2_Oct25.iso"
|
||||||
;;
|
;;
|
||||||
"tiny11" )
|
"tiny11" )
|
||||||
size=3788177408
|
size=5514559488
|
||||||
sum="a028800a91addc35d8ae22dce7459b67330f7d69d2f11c70f53c0fdffa5b4280"
|
sum="92484f2b7f707e42383294402a9eabbadeaa5ede80ac633390ae7f3537e36275"
|
||||||
url="tiny11-2311/tiny11%202311%20x64.iso"
|
url="tiny11_25H2/tiny11_25H2_Oct25.iso"
|
||||||
;;
|
;;
|
||||||
"tiny10" )
|
"tiny10" )
|
||||||
size=3839819776
|
size=3839819776
|
||||||
|
|
@ -1123,9 +1123,9 @@ getLink4() {
|
||||||
url="tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
url="tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64" )
|
"win11x64" )
|
||||||
size=5819484160
|
size=7736125440
|
||||||
sum="b56b911bf18a2ceaeb3904d87e7c770bdf92d3099599d61ac2497b91bf190b11"
|
sum="d141f6030fed50f75e2b03e1eb2e53646c4b21e5386047cb860af5223f102a32"
|
||||||
url="windows-11-24h2-x64/Windows%2011%2024H2%20x64.iso"
|
url="W11x64_26200.6584/26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENT_CONSUMER_x64FRE_en-us.iso"
|
||||||
;;
|
;;
|
||||||
"win11x64-enterprise" | "win11x64-enterprise-eval" )
|
"win11x64-enterprise" | "win11x64-enterprise-eval" )
|
||||||
size=6209064960
|
size=6209064960
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@ cd /run
|
||||||
. boot.sh # Configure boot
|
. boot.sh # Configure boot
|
||||||
. proc.sh # Initialize processor
|
. proc.sh # Initialize processor
|
||||||
. power.sh # Configure shutdown
|
. power.sh # Configure shutdown
|
||||||
|
. memory.sh # Check available memory
|
||||||
. config.sh # Configure arguments
|
. config.sh # Configure arguments
|
||||||
|
. finish.sh # Finish initialization
|
||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
|
|
@ -37,6 +39,8 @@ terminal
|
||||||
tail -fn +0 "$QEMU_LOG" --pid=$$ 2>/dev/null &
|
tail -fn +0 "$QEMU_LOG" --pid=$$ 2>/dev/null &
|
||||||
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" | \
|
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" | \
|
||||||
sed -u -e 's/\x1B\[[=0-9;]*[a-z]//gi' \
|
sed -u -e 's/\x1B\[[=0-9;]*[a-z]//gi' \
|
||||||
|
-e 's/\x1B\x63//g' -e 's/\x1B\[[=?]7l//g' \
|
||||||
|
-e '/^$/d' -e 's/\x44\x53\x73//g' \
|
||||||
-e 's/failed to load Boot/skipped Boot/g' \
|
-e 's/failed to load Boot/skipped Boot/g' \
|
||||||
-e 's/0): Not Found/0)/g' & wait $! || :
|
-e 's/0): Not Found/0)/g' & wait $! || :
|
||||||
|
|
||||||
|
|
|
||||||
183
src/install.sh
183
src/install.sh
|
|
@ -22,7 +22,11 @@ backup () {
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$root"
|
if ! makeDir "$root"; then
|
||||||
|
error "Failed to create directory \"$root\" !"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local folder="$name"
|
local folder="$name"
|
||||||
local dir="$root/$folder"
|
local dir="$root/$folder"
|
||||||
|
|
||||||
|
|
@ -34,7 +38,11 @@ backup () {
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
mkdir -p "$dir"
|
|
||||||
|
if ! makeDir "$dir"; then
|
||||||
|
error "Failed to create directory \"$dir\" !"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
[ -f "$iso" ] && mv -f "$iso" "$dir/"
|
[ -f "$iso" ] && mv -f "$iso" "$dir/"
|
||||||
find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -not -iname '*.iso' -exec mv -n {} "$dir/" \;
|
find "$STORAGE" -maxdepth 1 -type f -iname 'data.*' -not -iname '*.iso' -exec mv -n {} "$dir/" \;
|
||||||
|
|
@ -127,7 +135,6 @@ startInstall() {
|
||||||
if [[ "${VERSION,,}" == "http"* ]]; then
|
if [[ "${VERSION,,}" == "http"* ]]; then
|
||||||
|
|
||||||
file=$(basename "${VERSION%%\?*}")
|
file=$(basename "${VERSION%%\?*}")
|
||||||
file="${file//+/ }"
|
|
||||||
printf -v file '%b' "${file//%/\\x}"
|
printf -v file '%b' "${file//%/\\x}"
|
||||||
file="${file//[!A-Za-z0-9._-]/_}"
|
file="${file//[!A-Za-z0-9._-]/_}"
|
||||||
|
|
||||||
|
|
@ -156,7 +163,9 @@ startInstall() {
|
||||||
! backup "" && error "Backup failed!"
|
! backup "" && error "Backup failed!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$TMP"
|
if ! makeDir "$TMP"; then
|
||||||
|
error "Failed to create directory \"$TMP\" !"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$CUSTOM" ]; then
|
if [ -z "$CUSTOM" ]; then
|
||||||
|
|
||||||
|
|
@ -178,6 +187,20 @@ startInstall() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeFile() {
|
||||||
|
|
||||||
|
local txt="$1"
|
||||||
|
local path="$2"
|
||||||
|
|
||||||
|
echo "$txt" >"$path"
|
||||||
|
|
||||||
|
if ! setOwner "$path"; then
|
||||||
|
error "Failed to set the owner for \"$path\" !"
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
finishInstall() {
|
finishInstall() {
|
||||||
|
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
|
|
@ -188,6 +211,10 @@ finishInstall() {
|
||||||
error "Failed to find ISO file: $iso" && return 1
|
error "Failed to find ISO file: $iso" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$iso" == "$STORAGE/"* ]]; then
|
||||||
|
! setOwner "$iso" && error "Failed to set the owner for \"$iso\" !"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$aborted" != [Yy1]* ]]; then
|
if [[ "$aborted" != [Yy1]* ]]; then
|
||||||
# Mark ISO as prepared via magic byte
|
# Mark ISO as prepared via magic byte
|
||||||
byte="16" && [[ "$MANUAL" == [Yy1]* ]] && byte="17"
|
byte="16" && [[ "$MANUAL" == [Yy1]* ]] && byte="17"
|
||||||
|
|
@ -196,56 +223,68 @@ finishInstall() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -f /run/version "$STORAGE/windows.ver"
|
local file="$STORAGE/windows.ver"
|
||||||
|
cp -f /run/version "$file"
|
||||||
|
! setOwner "$file" && error "Failed to set the owner for \"$file\" !"
|
||||||
|
|
||||||
if [[ "$iso" == "$STORAGE/"* ]]; then
|
if [[ "$iso" == "$STORAGE/"* ]]; then
|
||||||
if [[ "$aborted" != [Yy1]* ]] || [ -z "$CUSTOM" ]; then
|
if [[ "$aborted" != [Yy1]* ]] || [ -z "$CUSTOM" ]; then
|
||||||
base=$(basename "$iso")
|
base=$(basename "$iso")
|
||||||
echo "$base" > "$STORAGE/windows.base"
|
file="$STORAGE/windows.base"
|
||||||
|
writeFile "$base" "$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
||||||
if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then
|
if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then
|
||||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
file="$STORAGE/windows.mode"
|
||||||
|
writeFile "$BOOT_MODE" "$file"
|
||||||
if [[ "${MACHINE,,}" != "q35" ]]; then
|
if [[ "${MACHINE,,}" != "q35" ]]; then
|
||||||
echo "$MACHINE" > "$STORAGE/windows.old"
|
file="$STORAGE/windows.old"
|
||||||
|
writeFile "$MACHINE" "$file"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Enable secure boot + TPM on manual installs as Win11 requires
|
# Enable secure boot + TPM on manual installs as Win11 requires
|
||||||
if [[ "$MANUAL" == [Yy1]* || "$aborted" == [Yy1]* ]]; then
|
if [[ "$MANUAL" == [Yy1]* || "$aborted" == [Yy1]* ]]; then
|
||||||
if [[ "${DETECTED,,}" == "win11"* ]]; then
|
if [[ "${DETECTED,,}" == "win11"* ]]; then
|
||||||
BOOT_MODE="windows_secure"
|
BOOT_MODE="windows_secure"
|
||||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
file="$STORAGE/windows.mode"
|
||||||
|
writeFile "$BOOT_MODE" "$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Enable secure boot on multi-socket systems to workaround freeze
|
# Enable secure boot on multi-socket systems to workaround freeze
|
||||||
if [ -n "$SOCKETS" ] && [[ "$SOCKETS" != "1" ]]; then
|
if [ -n "$SOCKETS" ] && [[ "$SOCKETS" != "1" ]]; then
|
||||||
BOOT_MODE="windows_secure"
|
BOOT_MODE="windows_secure"
|
||||||
echo "$BOOT_MODE" > "$STORAGE/windows.mode"
|
file="$STORAGE/windows.mode"
|
||||||
|
writeFile "$BOOT_MODE" "$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${ARGS:-}" ]; then
|
if [ -n "${ARGS:-}" ]; then
|
||||||
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
ARGUMENTS="$ARGS ${ARGUMENTS:-}"
|
||||||
echo "$ARGS" > "$STORAGE/windows.args"
|
file="$STORAGE/windows.args"
|
||||||
|
writeFile "$ARGS" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${VGA:-}" ] && [[ "${VGA:-}" != "virtio"* ]]; then
|
if [ -n "${VGA:-}" ] && [[ "${VGA:-}" != "virtio"* ]]; then
|
||||||
echo "$VGA" > "$STORAGE/windows.vga"
|
file="$STORAGE/windows.vga"
|
||||||
|
writeFile "$VGA" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${USB:-}" ] && [[ "${USB:-}" != "qemu-xhci"* ]]; then
|
if [ -n "${USB:-}" ] && [[ "${USB:-}" != "qemu-xhci"* ]]; then
|
||||||
echo "$USB" > "$STORAGE/windows.usb"
|
file="$STORAGE/windows.usb"
|
||||||
|
writeFile "$USB" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
|
if [ -n "${DISK_TYPE:-}" ] && [[ "${DISK_TYPE:-}" != "scsi" ]]; then
|
||||||
echo "$DISK_TYPE" > "$STORAGE/windows.type"
|
file="$STORAGE/windows.type"
|
||||||
|
writeFile "$DISK_TYPE" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${ADAPTER:-}" ] && [[ "${ADAPTER:-}" != "virtio-net-pci" ]]; then
|
if [ -n "${ADAPTER:-}" ] && [[ "${ADAPTER:-}" != "virtio-net-pci" ]]; then
|
||||||
echo "$ADAPTER" > "$STORAGE/windows.net"
|
file="$STORAGE/windows.net"
|
||||||
|
writeFile "$ADAPTER" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$TMP"
|
rm -rf "$TMP"
|
||||||
|
|
@ -339,19 +378,24 @@ extractESD() {
|
||||||
local dir="$2"
|
local dir="$2"
|
||||||
local version="$3"
|
local version="$3"
|
||||||
local desc="$4"
|
local desc="$4"
|
||||||
local size size_gb space space_gb desc
|
local size size_gb sizes space space_gb
|
||||||
|
local desc total total1 total2 total3 total4
|
||||||
|
local imageIndex links links1 links2 links3 links4
|
||||||
|
|
||||||
local msg="Extracting $desc bootdisk..."
|
local msg="Extracting $desc bootdisk"
|
||||||
info "$msg" && html "$msg"
|
info "$msg..." && html "$msg..."
|
||||||
|
|
||||||
if [ "$(stat -c%s "$iso")" -lt 100000000 ]; then
|
if [ "$(stat -c%s "$iso")" -lt 100000000 ]; then
|
||||||
error "Invalid ESD file: Size is smaller than 100 MB" && return 1
|
error "Invalid ESD file: Size is smaller than 100 MB" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
mkdir -p "$dir"
|
|
||||||
|
|
||||||
size=16106127360
|
if ! makeDir "$dir"; then
|
||||||
|
error "Failed to create directory \"$dir\" !" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
size=9606127360
|
||||||
size_gb=$(formatBytes "$size")
|
size_gb=$(formatBytes "$size")
|
||||||
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
||||||
space_gb=$(formatBytes "$space")
|
space_gb=$(formatBytes "$space")
|
||||||
|
|
@ -367,40 +411,70 @@ extractESD() {
|
||||||
error "Cannot read the image count in ESD file!" && return 1
|
error "Cannot read the image count in ESD file!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wimlib-imagex apply "$iso" 1 "$dir" --quiet 2>/dev/null || {
|
sizes=$(wimlib-imagex info "$iso" | grep "Total Bytes:")
|
||||||
|
links=$(wimlib-imagex info "$iso" | grep "Hard Link Bytes:")
|
||||||
|
|
||||||
|
total1=$(awk "NR==1{ print; }" <<< "$sizes" | cut -d':' -f2 | sed 's/^ *//')
|
||||||
|
links1=$(awk "NR==1{ print; }" <<< "$links" | cut -d':' -f2 | sed 's/^ *//')
|
||||||
|
total=$(( total1 - links1 ))
|
||||||
|
|
||||||
|
total3=$(awk "NR==3{ print; }" <<< "$sizes" | cut -d':' -f2 | sed 's/^ *//')
|
||||||
|
links3=$(awk "NR==3{ print; }" <<< "$links" | cut -d':' -f2 | sed 's/^ *//')
|
||||||
|
total3=$(( total3 - links3 ))
|
||||||
|
total3=$(( total3 + 60000000 ))
|
||||||
|
|
||||||
|
/run/progress.sh "$dir" "$total" "$msg ([P])..." &
|
||||||
|
|
||||||
|
imageIndex="1"
|
||||||
|
wimlib-imagex apply "$iso" "$imageIndex" "$dir" --quiet 2>/dev/null || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
error "Extracting $desc bootdisk failed" && return $retVal
|
fKill "progress.sh"
|
||||||
|
error "Extracting $desc bootdisk failed ($retVal)" && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
|
|
||||||
local bootWimFile="$dir/sources/boot.wim"
|
local bootWimFile="$dir/sources/boot.wim"
|
||||||
local installWimFile="$dir/sources/install.wim"
|
local installWimFile="$dir/sources/install.wim"
|
||||||
|
|
||||||
local msg="Extracting $desc environment..."
|
local msg="Extracting $desc environment"
|
||||||
info "$msg" && html "$msg"
|
info "$msg..." && html "$msg..."
|
||||||
|
|
||||||
wimlib-imagex export "$iso" 2 "$bootWimFile" --compress=none --quiet || {
|
imageIndex="2"
|
||||||
|
/run/progress.sh "$bootWimFile" "$total3" "$msg ([P])..." &
|
||||||
|
|
||||||
|
wimlib-imagex export "$iso" "$imageIndex" "$bootWimFile" --compress=none --quiet || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
error "Adding WinPE failed" && return ${retVal}
|
fKill "progress.sh"
|
||||||
|
error "Adding WinPE failed ($retVal)" && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
local msg="Extracting $desc setup..."
|
fKill "progress.sh"
|
||||||
info "$msg" && html "$msg"
|
|
||||||
|
|
||||||
wimlib-imagex export "$iso" 3 "$bootWimFile" --compress=none --boot --quiet || {
|
local msg="Extracting $desc setup"
|
||||||
|
info "$msg..."
|
||||||
|
|
||||||
|
imageIndex="3"
|
||||||
|
/run/progress.sh "$bootWimFile" "$total3" "$msg ([P])..." &
|
||||||
|
|
||||||
|
wimlib-imagex export "$iso" "$imageIndex" "$bootWimFile" --compress=none --boot --quiet || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
error "Adding Windows Setup failed" && return ${retVal}
|
fKill "progress.sh"
|
||||||
|
error "Adding Windows Setup failed ($retVal)" && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
|
|
||||||
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
||||||
LABEL="CCCOMA_X64FRE_EN-US_DV9"
|
LABEL="CCCOMA_X64FRE_EN-US_DV9"
|
||||||
else
|
else
|
||||||
LABEL="CPBA_A64FRE_EN-US_DV9"
|
LABEL="CPBA_A64FRE_EN-US_DV9"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local msg="Extracting $desc image..."
|
local msg="Extracting $desc image"
|
||||||
info "$msg" && html "$msg"
|
info "$msg..." && html "$msg..."
|
||||||
|
|
||||||
local edition imageIndex imageEdition
|
local edition imageEdition
|
||||||
edition=$(getCatalog "$version" "name")
|
edition=$(getCatalog "$version" "name")
|
||||||
|
|
||||||
if [ -z "$edition" ]; then
|
if [ -z "$edition" ]; then
|
||||||
|
|
@ -408,15 +482,27 @@ extractESD() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
|
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
|
||||||
imageEdition=$(wimlib-imagex info "$iso" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//')
|
|
||||||
|
imageEdition=$(wimlib-imagex info "$iso" "$imageIndex" | grep '^Description:' | sed 's/Description:[ \t]*//')
|
||||||
[[ "${imageEdition,,}" != "${edition,,}" ]] && continue
|
[[ "${imageEdition,,}" != "${edition,,}" ]] && continue
|
||||||
wimlib-imagex export "$iso" ${imageIndex} "$installWimFile" --compress=LZMS --chunk-size 128K --quiet || {
|
|
||||||
|
total4=$(du -sb "$iso" | cut -f1)
|
||||||
|
total4=$(( total4 + 3000000 ))
|
||||||
|
|
||||||
|
/run/progress.sh "$installWimFile" "$total4" "$msg ([P])..." &
|
||||||
|
|
||||||
|
wimlib-imagex export "$iso" "$imageIndex" "$installWimFile" --compress=LZMS --chunk-size 128K --quiet || {
|
||||||
retVal=$?
|
retVal=$?
|
||||||
error "Addition of $imageIndex to the $desc image failed" && return $retVal
|
fKill "progress.sh"
|
||||||
|
error "Addition of $imageIndex to the $desc image failed ($retVal)" && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
error "Failed to find product '$edition' in install.wim!" && return 1
|
error "Failed to find product '$edition' in install.wim!" && return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -440,18 +526,21 @@ extractImage() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local msg="Extracting $desc image..."
|
local msg="Extracting $desc image"
|
||||||
info "$msg" && html "$msg"
|
info "$msg..." && html "$msg..."
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
mkdir -p "$dir"
|
|
||||||
|
if ! makeDir "$dir"; then
|
||||||
|
error "Failed to create directory \"$dir\" !" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
size=$(stat -c%s "$iso")
|
size=$(stat -c%s "$iso")
|
||||||
size_gb=$(formatBytes "$size")
|
size_gb=$(formatBytes "$size")
|
||||||
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
space=$(df --output=avail -B 1 "$dir" | tail -n 1)
|
||||||
space_gb=$(formatBytes "$space")
|
space_gb=$(formatBytes "$space")
|
||||||
|
|
||||||
if ((size<100000000)); then
|
if (( size < 100000000 )); then
|
||||||
error "Invalid ISO file: Size is smaller than 100 MB" && return 1
|
error "Invalid ISO file: Size is smaller than 100 MB" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -460,11 +549,15 @@ extractImage() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
|
/run/progress.sh "$dir" "$size" "$msg ([P])..." &
|
||||||
|
|
||||||
if ! 7z x "$iso" -o"$dir" > /dev/null; then
|
if ! 7z x "$iso" -o"$dir" > /dev/null; then
|
||||||
|
fKill "progress.sh"
|
||||||
error "Failed to extract ISO file: $iso" && return 1
|
error "Failed to extract ISO file: $iso" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
|
|
||||||
if [[ "${UNPACK:-}" != [Yy1]* ]]; then
|
if [[ "${UNPACK:-}" != [Yy1]* ]]; then
|
||||||
|
|
||||||
LABEL=$(isoinfo -d -i "$iso" | sed -n 's/Volume id: //p')
|
LABEL=$(isoinfo -d -i "$iso" | sed -n 's/Volume id: //p')
|
||||||
|
|
@ -1077,8 +1170,8 @@ buildImage() {
|
||||||
|
|
||||||
desc=$(printVersion "$DETECTED" "ISO")
|
desc=$(printVersion "$DETECTED" "ISO")
|
||||||
|
|
||||||
local msg="Building $desc image..."
|
local msg="Building $desc image"
|
||||||
info "$msg" && html "$msg"
|
info "$msg..." && html "$msg..."
|
||||||
|
|
||||||
[ -z "$LABEL" ] && LABEL="Windows"
|
[ -z "$LABEL" ] && LABEL="Windows"
|
||||||
|
|
||||||
|
|
@ -1095,6 +1188,8 @@ buildImage() {
|
||||||
error "Not enough free space in $STORAGE, have $space_gb available but need at least $size_gb." && return 1
|
error "Not enough free space in $STORAGE, have $space_gb available but need at least $size_gb." && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
/run/progress.sh "$out" "$size" "$msg ([P])..." &
|
||||||
|
|
||||||
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
|
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
|
||||||
|
|
||||||
genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
|
genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
|
||||||
|
|
@ -1115,6 +1210,8 @@ buildImage() {
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fKill "progress.sh"
|
||||||
|
|
||||||
if [ -n "$failed" ]; then
|
if [ -n "$failed" ]; then
|
||||||
[ -s "$log" ] && echo "$(<"$log")"
|
[ -s "$log" ] && echo "$(<"$log")"
|
||||||
error "Failed to build image!" && return 1
|
error "Failed to build image!" && return 1
|
||||||
|
|
@ -1127,6 +1224,8 @@ buildImage() {
|
||||||
[[ "$error" != "$hide" ]] && echo "$error"
|
[[ "$error" != "$hide" ]] && echo "$error"
|
||||||
|
|
||||||
mv -f "$out" "$BOOT" || return 1
|
mv -f "$out" "$BOOT" || return 1
|
||||||
|
! setOwner "$BOOT" && error "Failed to set the owner for \"$BOOT\" !"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -487,8 +487,11 @@ getESD() {
|
||||||
info "$msg" && html "$msg"
|
info "$msg" && html "$msg"
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
mkdir -p "$dir"
|
|
||||||
|
|
||||||
|
if ! makeDir "$dir"; then
|
||||||
|
error "Failed to create directory \"$dir\" !" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
local xFile="products.xml"
|
local xFile="products.xml"
|
||||||
local eFile="esd_edition.xml"
|
local eFile="esd_edition.xml"
|
||||||
local fFile="products_filter.xml"
|
local fFile="products_filter.xml"
|
||||||
|
|
|
||||||
17
src/power.sh
17
src/power.sh
|
|
@ -74,6 +74,7 @@ ready() {
|
||||||
finish() {
|
finish() {
|
||||||
|
|
||||||
local pid
|
local pid
|
||||||
|
local cnt=0
|
||||||
local reason=$1
|
local reason=$1
|
||||||
|
|
||||||
touch "$QEMU_END"
|
touch "$QEMU_END"
|
||||||
|
|
@ -81,20 +82,32 @@ finish() {
|
||||||
if [ -s "$QEMU_PID" ]; then
|
if [ -s "$QEMU_PID" ]; then
|
||||||
|
|
||||||
pid=$(<"$QEMU_PID")
|
pid=$(<"$QEMU_PID")
|
||||||
error "Forcefully terminating Windows, reason: $reason..."
|
echo && error "Forcefully terminating Windows, reason: $reason..."
|
||||||
{ kill -15 "$pid" || true; } 2>/dev/null
|
{ kill -15 "$pid" || true; } 2>/dev/null
|
||||||
|
|
||||||
while isAlive "$pid"; do
|
while isAlive "$pid"; do
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
cnt=$((cnt+1))
|
||||||
|
|
||||||
# Workaround for zombie pid
|
# Workaround for zombie pid
|
||||||
[ ! -s "$QEMU_PID" ] && break
|
[ ! -s "$QEMU_PID" ] && break
|
||||||
|
|
||||||
|
if [ "$cnt" == "5" ]; then
|
||||||
|
echo && error "QEMU did not terminate itself, forcefully killing process..."
|
||||||
|
{ kill -9 "$pid" || true; } 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
|
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
|
||||||
# Remove CD-ROM ISO after install
|
# Remove CD-ROM ISO after install
|
||||||
if ready; then
|
if ready; then
|
||||||
touch "$STORAGE/windows.boot"
|
local file="$STORAGE/windows.boot"
|
||||||
|
touch "$file"
|
||||||
|
! setOwner "$file" && error "Failed to set the owner for \"$file\" !"
|
||||||
if [[ "$REMOVE" != [Nn]* ]]; then
|
if [[ "$REMOVE" != [Nn]* ]]; then
|
||||||
rm -f "$BOOT" 2>/dev/null || true
|
rm -f "$BOOT" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
30
src/samba.sh
30
src/samba.sh
|
|
@ -46,10 +46,21 @@ addShare() {
|
||||||
local cfg="$5"
|
local cfg="$5"
|
||||||
local owner=""
|
local owner=""
|
||||||
|
|
||||||
mkdir -p "$dir" || return 1
|
if [ ! -d "$dir" ]; then
|
||||||
|
if ! mkdir -p "$dir"; then
|
||||||
|
error "Failed to create shared folder ($dir)." && return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if ! ls -A "$dir" >/dev/null 2>&1; then
|
if ! ls -A "$dir" >/dev/null 2>&1; then
|
||||||
error "Failed to access directory $dir" && return 1
|
msg="No permission to access shared folder ($dir)."
|
||||||
|
msg+=" If SELinux is active, you need to add the \":Z\" flag to the bind mount."
|
||||||
|
error "$msg" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -w "$dir" ]; then
|
||||||
|
msg="shared folder ($dir) is not writeable!"
|
||||||
|
warn "$msg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$(ls -A "$dir")" ]; then
|
if [ -z "$(ls -A "$dir")" ]; then
|
||||||
|
|
@ -136,26 +147,21 @@ share="/shared"
|
||||||
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
|
[ ! -d "$share" ] && [ -d "$STORAGE/data" ] && share="$STORAGE/data"
|
||||||
[ ! -d "$share" ] && share="$tmp"
|
[ ! -d "$share" ] && share="$tmp"
|
||||||
|
|
||||||
m1="Failed to add shared folder"
|
! addShare "$share" "/shared" "Data" "Shared" "$SAMBA_CONFIG" && return 0
|
||||||
m2="Please check its permissions."
|
|
||||||
|
|
||||||
if ! addShare "$share" "/shared" "Data" "Shared" "$SAMBA_CONFIG"; then
|
|
||||||
error "$m1 '$share'. $m2" && return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "/shared2" ]; then
|
if [ -d "/shared2" ]; then
|
||||||
addShare "/shared2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || error "$m1 '/shared2'. $m2"
|
addShare "/shared2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || :
|
||||||
else
|
else
|
||||||
if [ -d "/data2" ]; then
|
if [ -d "/data2" ]; then
|
||||||
addShare "/data2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || error "$m1 '/data2'. $m2."
|
addShare "/data2" "/shared2" "Data2" "Shared" "$SAMBA_CONFIG" || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "/shared3" ]; then
|
if [ -d "/shared3" ]; then
|
||||||
addShare "/shared3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || error "$m1 '/shared3'. $m2"
|
addShare "/shared3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || :
|
||||||
else
|
else
|
||||||
if [ -d "/data3" ]; then
|
if [ -d "/data3" ]; then
|
||||||
addShare "/data3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || error "$m1 '/data3'. $m2"
|
addShare "/data3" "/shared3" "Data3" "Shared" "$SAMBA_CONFIG" || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue