Update readme.md

Changes following:

- Installs Windows 11 Enterprise by default.
- Updates default machine specs, to following and adds /dev/net/tun:
  - RAM: 8GB
  - CPU Cores: 8
  - Disk size: 512GB
- Prettify reading in README.
This commit is contained in:
Alice King Tai Poon 潘景泰 2024-07-17 14:59:33 +08:00 committed by GitHub
parent 3eda68ed74
commit addeb4a944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,7 +23,7 @@ Windows inside a Docker container.
## Video 📺 ## Video 📺
[![Youtube](https://img.youtube.com/vi/xhGYobuG508/0.jpg)](https://www.youtube.com/watch?v=xhGYobuG508) [![Youtube](https://img.youtube.com/vi/xhGYobuG508/0.jpg)](https://youtu.be/xhGYobuG508)
## Usage 🐳 ## Usage 🐳
@ -35,9 +35,10 @@ services:
image: dockurr/windows image: dockurr/windows
container_name: windows container_name: windows
environment: environment:
VERSION: "win11" VERSION: "win11e"
devices: devices:
- /dev/kvm - /dev/kvm
- /dev/net/tun
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
ports: ports:
@ -50,7 +51,7 @@ services:
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 -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
``` ```
Via Kubernetes: Via Kubernetes:
@ -63,7 +64,7 @@ kubectl apply -f kubernetes.yml
### How do I use it? ### How do I use it?
Very simple! These are the steps: Simple! Steps below:
- Start the container and connect to [port 8006](http://localhost:8006) using your web browser. - Start the container and connect to [port 8006](http://localhost:8006) using your web browser.
@ -75,11 +76,11 @@ kubectl apply -f kubernetes.yml
### 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 Enterprise 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:
VERSION: "win11" VERSION: "win11e"
``` ```
Select from the values below: Select from the values below:
@ -148,11 +149,11 @@ kubectl apply -f kubernetes.yml
### How do I change the size of the disk? ### How do I change the size of the disk?
To expand the default size of 64 GB, add the `DISK_SIZE` setting to your compose file and set it to your preferred capacity: To expand the default size of 512GB, add the `DISK_SIZE` setting to your compose file and set it to your preferred capacity:
```yaml ```yaml
environment: environment:
DISK_SIZE: "256G" DISK_SIZE: "1T"
``` ```
> [!TIP] > [!TIP]
@ -192,7 +193,7 @@ kubectl apply -f kubernetes.yml
### 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 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:
@ -203,7 +204,7 @@ kubectl apply -f kubernetes.yml
### How do I perform a manual installation? ### How do I perform a manual installation?
It's best to stick to the automatic installation, as it adjusts various settings to prevent common issues when running Windows inside a virtual environment. It's best sticking to automatic installation, as adjusting various settings to prevent common issues when running Windows inside a virtual environment.
However, if you insist on performing the installation manually, add the following environment variable to your compose file: However, if you insist on performing the installation manually, add the following environment variable to your compose file:
@ -214,14 +215,14 @@ kubectl apply -f kubernetes.yml
### How do I change the amount of CPU or RAM? ### How do I change the amount of CPU or RAM?
By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM. By default, the container will be allowed to use a maximum of 8 CPU cores and 8 GB of RAM.
If you want to adjust this, you can specify the desired amount using the following environment variables: If you want to adjust this, you can specify the desired amount using the following environment variables:
```yaml ```yaml
environment: environment:
RAM_SIZE: "8G" RAM_SIZE: "16G"
CPU_CORES: "4" CPU_CORES: "32"
``` ```
### How do I configure the username and password? ### How do I configure the username and password?
@ -307,9 +308,11 @@ kubectl apply -f kubernetes.yml
environment: environment:
DISK2_SIZE: "32G" DISK2_SIZE: "32G"
DISK3_SIZE: "64G" DISK3_SIZE: "64G"
...
volumes: volumes:
- /home/example:/storage2 - /home/example:/storage2
- /mnt/data/example:/storage3 - /mnt/data/example:/storage3
...
``` ```
### How do I pass-through a disk? ### How do I pass-through a disk?
@ -320,6 +323,7 @@ kubectl apply -f kubernetes.yml
devices: devices:
- /dev/sdb:/disk1 - /dev/sdb:/disk1
- /dev/sdc:/disk2 - /dev/sdc:/disk2
...
``` ```
Use `/disk1` if you want it to become your main drive, and use `/disk2` and higher to add them as secondary drives. Use `/disk1` if you want it to become your main drive, and use `/disk2` and higher to add them as secondary drives.
@ -349,7 +353,7 @@ kubectl apply -f kubernetes.yml
If you receive an error from `kvm-ok` indicating that KVM acceleration can't be used, please check whether: If you receive an error from `kvm-ok` indicating that KVM acceleration can't be used, please check whether:
- the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your BIOS. - the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your UEFI BIOS.
- you are running an operating system that supports them, like Linux or Windows 11 (macOS and Windows 10 do not unfortunately). - you are running an operating system that supports them, like Linux or Windows 11 (macOS and Windows 10 do not unfortunately).