mirror of
https://github.com/dockur/windows.git
synced 2026-07-05 07:08:10 +01:00
docs: Readme (#1776)
This commit is contained in:
@@ -19,14 +19,17 @@ Windows inside a Docker container.
|
||||
- ISO downloader
|
||||
- KVM acceleration
|
||||
- Web-based viewer
|
||||
- Automatic install
|
||||
- Shared host folder
|
||||
- USB pass through
|
||||
|
||||
## Video 📺
|
||||
|
||||
[](https://www.youtube.com/watch?v=xhGYobuG508)
|
||||
[](https://www.youtube.com/watch?v=xhGYobuG508)
|
||||
|
||||
## Usage 🐳
|
||||
|
||||
##### Via Docker Compose:
|
||||
##### Docker Compose:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@@ -50,26 +53,35 @@ services:
|
||||
stop_grace_period: 2m
|
||||
```
|
||||
|
||||
##### Via Docker CLI:
|
||||
##### Docker CLI:
|
||||
|
||||
```bash
|
||||
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:
|
||||
##### Kubernetes:
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/master/kubernetes.yml
|
||||
```
|
||||
|
||||
##### Via Github Codespaces:
|
||||
##### GitHub Codespaces:
|
||||
|
||||
[](https://codespaces.new/dockur/windows)
|
||||
|
||||
##### Via a graphical installer:
|
||||
##### Graphical installer:
|
||||
|
||||
[](https://winboat.app)
|
||||
|
||||
## Requirements ⚙️
|
||||
|
||||
- A Linux host with KVM support, or Docker Desktop / Podman on Windows 11 with nested virtualization enabled.
|
||||
- At least 4 GB of RAM available.
|
||||
- At least 64 GB of free disk space.
|
||||
|
||||
> [!NOTE]
|
||||
> Docker Desktop on macOS and Windows 10 do not currently provide the required KVM support for this image.
|
||||
|
||||
## FAQ 💬
|
||||
|
||||
### How do I use it?
|
||||
@@ -78,7 +90,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
- Start the container and connect to [port 8006](http://127.0.0.1:8006/) using your web browser.
|
||||
|
||||
- Sit back and relax while the magic happens, the whole installation will be performed fully automatic.
|
||||
- Sit back and relax while the magic happens, the whole installation will be performed fully automatically.
|
||||
|
||||
- Once you see the desktop, your Windows installation is ready for use.
|
||||
|
||||
@@ -90,7 +102,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
VERSION: "11"
|
||||
VERSION: "10"
|
||||
```
|
||||
|
||||
Select from the values below:
|
||||
@@ -143,7 +155,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> This can also be used to resize the existing disk to a larger capacity without any data loss. However you will need to [manually extend the disk partition](https://learn.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume?tabs=disk-management) afterwards, since the added disk space will appear as unallocated.
|
||||
> This can also be used to resize an existing disk to a larger capacity without any data loss. However, you will need to [manually extend the disk partition](https://learn.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume?tabs=disk-management) afterwards, since the added disk space will appear as unallocated.
|
||||
|
||||
### How do I share files with the host?
|
||||
|
||||
@@ -174,7 +186,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
By default, a user called `Docker` is created and its password is `admin`.
|
||||
|
||||
If you want to use different credentials during installation, you can configure them in your compose file:
|
||||
If you want to set up different credentials during installation, you can configure them in your compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -197,7 +209,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### 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 `KEYBOARD` and `REGION` variables like this:
|
||||
If you want to set up a keyboard layout or locale that is not the default for your selected language, you can add `KEYBOARD` and `REGION` variables like this:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -218,7 +230,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./example.iso:/boot.iso
|
||||
- ./example.iso:/custom.iso
|
||||
```
|
||||
|
||||
Replace the example path `./example.iso` with the filename of your desired ISO file. The value of `VERSION` will be ignored in this case.
|
||||
@@ -234,13 +246,13 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
- ./example:/oem
|
||||
```
|
||||
|
||||
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.
|
||||
The example folder `./example` will be copied to `C:\OEM` and the `install.bat` file inside that folder will be executed during the last step of the automatic installation.
|
||||
|
||||
### How do I perform a manual installation?
|
||||
|
||||
It's recommended to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment.
|
||||
|
||||
However, if you insist on performing the installation manually at your own risk, add the following environment variable to your compose file:
|
||||
However, if you insist on performing the installation manually (at your own risk), add the following environment variable to your compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -249,11 +261,11 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### 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.
|
||||
|
||||
So for a better experience you can connect using any Microsoft Remote Desktop client to the IP of the container, using the username `Docker` and password `admin`.
|
||||
|
||||
There is a RDP client for [Android](https://play.google.com/store/apps/details?id=com.microsoft.rdc.androidx) available from the Play Store and one for [iOS](https://apps.apple.com/nl/app/microsoft-remote-desktop/id714464092?l=en-GB) in the Apple Store. For Linux you can use [FreeRDP](https://www.freerdp.com/) and on Windows just type `mstsc` in the search box.
|
||||
There is an RDP client for [Android](https://play.google.com/store/apps/details?id=com.microsoft.rdc.androidx) available from the Play Store and one for [iOS](https://apps.apple.com/nl/app/microsoft-remote-desktop/id714464092?l=en-GB) in the Apple Store. For Linux you can use [FreeRDP](https://www.freerdp.com/) and on Windows just type `mstsc` in the search box.
|
||||
|
||||
### How do I assign an individual IP address to the container?
|
||||
|
||||
@@ -320,9 +332,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
- ./example3:/storage3
|
||||
```
|
||||
|
||||
### How do I pass-through a disk?
|
||||
### How do I pass through a disk?
|
||||
|
||||
It is possible to pass-through disk devices or partitions directly by adding them to your compose file in this way:
|
||||
You can pass through disk devices or partitions directly by adding them to your compose file in this way:
|
||||
|
||||
```yaml
|
||||
devices:
|
||||
@@ -332,9 +344,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
Use `/disk1` if you want it to become your main drive (which will be formatted during installation), and use `/disk2` and higher to add them as secondary drives (which will stay untouched).
|
||||
|
||||
### How do I pass-through a USB device?
|
||||
### How do I pass through a USB device?
|
||||
|
||||
To pass-through a USB device, first lookup its vendor and product id via the `lsusb` command, then add them to your compose file like this:
|
||||
To pass through a USB device, first look up its vendor and product IDs via the `lsusb` command, then add them to your compose file like this:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
@@ -344,7 +356,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Adding a USB mass storage device before Windows Setup has finished may cause it to fail. Or worse: the drive can get formatted as the system disk, and all your data will be lost! So always keep them disconnected when launching the container for the first time.
|
||||
> Adding a USB mass storage device before Windows Setup has finished may cause it to fail. Or worse: the drive can get formatted as the system disk, and all your data will be lost! So always keep them disconnected when launching the container for the first time.
|
||||
|
||||
### How do I verify if my system supports KVM?
|
||||
|
||||
@@ -370,7 +382,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
- you enabled "nested virtualization" if you are running the container inside a virtual machine.
|
||||
|
||||
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
|
||||
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPSs.
|
||||
|
||||
If you did not receive any error from `kvm-ok` but the container still complains about a missing KVM device, it could help to add `privileged: true` to your compose file (or `sudo` to your `docker` command) to rule out any permission issue.
|
||||
|
||||
@@ -384,7 +396,9 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas
|
||||
|
||||
### Is this project legal?
|
||||
|
||||
Yes, this project contains only open-source code and does not distribute any copyrighted material. Any product keys found in the code are just generic placeholders provided by Microsoft for trial purposes. So under all applicable laws, this project will be considered legal.
|
||||
Yes, this project contains only open-source code and does not distribute Windows itself. Any product keys found in the code are generic installation keys published by Microsoft for trial purposes and are not valid activation licenses.
|
||||
|
||||
You are responsible for ensuring that you have a valid Windows license and that your use complies with Microsoft's licensing terms.
|
||||
|
||||
## Stars 🌟
|
||||
[](https://github.com/dockur/windows/stargazers)
|
||||
|
||||
Reference in New Issue
Block a user