mirror of
https://github.com/dockur/windows.git
synced 2026-01-23 03:13:21 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bef943281 | ||
|
|
32e6b2a77e | ||
|
|
cabf74a0ba | ||
|
|
1a08bcea4a | ||
|
|
5d32e036dc | ||
|
|
a958bb1dcf | ||
|
|
ed4f6f7f7f | ||
|
|
f1bcd5a9ee | ||
|
|
3943181075 | ||
|
|
9fd26e4145 |
37
readme.md
37
readme.md
@@ -1,4 +1,4 @@
|
|||||||
<h1 align="center">Windows for Docker<br />
|
<h1 align="center">Windows in Docker<br />
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://github.com/dockur/windows/raw/master/.github/logo.png" title="Logo" style="max-width:100%;" width="128" />
|
<img src="https://github.com/dockur/windows/raw/master/.github/logo.png" title="Logo" style="max-width:100%;" width="128" />
|
||||||
</div>
|
</div>
|
||||||
@@ -16,7 +16,9 @@ Windows in a docker container.
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Multi-platform
|
- Multi-platform
|
||||||
|
- ISO downloader
|
||||||
- KVM acceleration
|
- KVM acceleration
|
||||||
|
- Web-based viewer
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -48,9 +50,29 @@ docker run -it --rm -e "VERSION=win11x64" -p 8006:8006 --device=/dev/kvm --cap-a
|
|||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
|
* ### How do I perform the installation?
|
||||||
|
|
||||||
|
- Start the container and wait until the ISO download is completed. If needed, you can view this progress in the Docker log, wait until you see the message ```BdsDxe: starting Boot```.
|
||||||
|
|
||||||
|
- Connect to port 8006 of the container in your webbrowser.
|
||||||
|
|
||||||
|
- Start the installation by clicking ```Install now```. On the next screen, press 'OK' when prompted for ```Load driver``` and select the ```VirtIO SCSI``` driver from the list that matches your Windows version. So for Windows 11, select ```D:\amd64\w11\vioscsi.inf``` and click 'Next'.
|
||||||
|
|
||||||
|
- Accept the license agreement and select your preferred Windows edition, like Home or Pro.
|
||||||
|
|
||||||
|
- Choose ```Custom: Install Windows only (advanced)```, and click ```Load driver``` in the next screen. Select 'Browse' and navigate to the ```D:\NetKVM\w11\amd64``` folder and click 'OK'. Select the ```VirtIO Ethernet Adapter``` from the list, and click 'Next'.
|
||||||
|
|
||||||
|
- Select 'Drive 0' and click 'Next'.
|
||||||
|
|
||||||
|
- Wait until Windows finishes copying files and completes the installation.
|
||||||
|
|
||||||
|
- Once you see your desktop, open File Explorer and navigate to the CD-ROM drive (D:). Double-click on ```virtio-win-gt-x64``` and proceed to install the VirtIO drivers.
|
||||||
|
|
||||||
|
- Now your Windows installation is ready for use. Enjoy it and don't forget to star this repo!
|
||||||
|
|
||||||
* ### How do I specify the Windows version?
|
* ### How do I specify the Windows version?
|
||||||
|
|
||||||
You can modify the `VERSION` environment variable to specify the version you want:
|
You can modify the `VERSION` environment variable to specify the version of Windows you want to download:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
@@ -62,20 +84,19 @@ docker run -it --rm -e "VERSION=win11x64" -p 8006:8006 --device=/dev/kvm --cap-a
|
|||||||
- ```win11x64``` (Windows 11)
|
- ```win11x64``` (Windows 11)
|
||||||
- ```win10x64``` (Windows 10)
|
- ```win10x64``` (Windows 10)
|
||||||
- ```win81x64``` (Windows 8.1)
|
- ```win81x64``` (Windows 8.1)
|
||||||
- ```win7x64-ultimate``` (Windows 7 )
|
|
||||||
- ```win2016-eval``` (Windows Server 2016)
|
|
||||||
- ```win2019-eval``` (Windows Server 2019)
|
|
||||||
- ```win2022-eval``` (Windows Server 2022)
|
- ```win2022-eval``` (Windows Server 2022)
|
||||||
|
- ```win2019-eval``` (Windows Server 2019)
|
||||||
|
- ```win2016-eval``` (Windows Server 2016)
|
||||||
|
|
||||||
* ### How do I see the screen?
|
* ### How can I view the screen?
|
||||||
|
|
||||||
The container includes a web-based viewer, so you can visit [http://localhost:8006/](http://localhost:8006/) using any webbrowser to view the screen and interact with Windows via the keyboard/mouse.
|
The container includes a web-based viewer, so you can visit [http://localhost:8006/](http://localhost:8006/) using any webbrowser to view the screen and interact with Windows via the keyboard/mouse.
|
||||||
|
|
||||||
Alternatively it is also possible to connect to port 5900 using a VNC client like RealVNC or many others.
|
This is mainly for use during installation, as afterwards you can use Remote Desktop, TeamViewer or any other software you prefer.
|
||||||
|
|
||||||
* ### How do I increase the amount of CPU or RAM?
|
* ### How do I increase the amount of CPU or RAM?
|
||||||
|
|
||||||
By default, 2 CPU cores and 4 GB of RAM are allocated to the container.
|
By default, 2 CPU cores and 4 GB of RAM are allocated to the container, as that are the minimum requirements of Windows 11.
|
||||||
|
|
||||||
To increase this, add the following environment variables:
|
To increase this, add the following environment variables:
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ echo "❯ For support visit https://github.com/dockur/windows"
|
|||||||
export DISPLAY=web
|
export DISPLAY=web
|
||||||
export BOOT_MODE=windows
|
export BOOT_MODE=windows
|
||||||
|
|
||||||
|
ln -sfn /usr/share/novnc/vnc_lite.html /usr/share/novnc/index.html
|
||||||
|
websockify -D --web /usr/share/novnc/ 8006 localhost:5900 2>/dev/null
|
||||||
|
|
||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
. reset.sh # Initialize system
|
. reset.sh # Initialize system
|
||||||
@@ -20,10 +23,6 @@ cd /run
|
|||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
if [[ "${DISPLAY,,}" == "web" ]]; then
|
|
||||||
websockify -D --web /usr/share/novnc/ 8006 localhost:5900 2>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /tmp/emulated_tpm
|
mkdir -p /tmp/emulated_tpm
|
||||||
swtpm socket -t -d --tpmstate dir=/tmp/emulated_tpm --ctrl type=unixio,path=/tmp/emulated_tpm/swtpm-sock --log level=1 --tpm2
|
swtpm socket -t -d --tpmstate dir=/tmp/emulated_tpm --ctrl type=unixio,path=/tmp/emulated_tpm/swtpm-sock --log level=1 --tpm2
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ ARGUMENTS="-tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0 $
|
|||||||
BASE="$VERSION.iso"
|
BASE="$VERSION.iso"
|
||||||
[ -f "$STORAGE/$BASE" ] && return 0
|
[ -f "$STORAGE/$BASE" ] && return 0
|
||||||
|
|
||||||
DEST="$STORAGE/drivers.img"
|
|
||||||
[ ! -f "$DEST" ] && cp /run/drivers.iso "$DEST"
|
|
||||||
|
|
||||||
rm -rf "$STORAGE/tmp"
|
rm -rf "$STORAGE/tmp"
|
||||||
mkdir -p "$STORAGE/tmp"
|
mkdir -p "$STORAGE/tmp"
|
||||||
SCRIPT="$STORAGE/tmp/mido.sh"
|
SCRIPT="$STORAGE/tmp/mido.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user