feat: mention new compose file shipped with repo in docker docs

This commit is contained in:
Oskar Manhart 2024-05-26 13:02:24 +00:00 committed by GitHub
parent 18229bfef9
commit aba92bc535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,27 +2,25 @@
## Why docker?
While working with virsh is completely fine for winapps, however you have to setup and optimise you vm manually. Docker on the other hand setups most of the stuff automatically and also makes the vm highly portable between linux distros.
While working with `virsh` is completely fine for winapps, you have to set up and optimize you vm manually. Docker on the other hand sets up most of the stuff automatically and also makes the VM highly portable between Linux distros.
# Requirements
Since docker manages the dependencies of the container automatically you only need to install docker or podman itself. (Podman is recommended because of the faster container startup times. Note that podman and docker are interchangeable so no instructions will change depending on which one you use)
Since Docker manages the dependencies of the container automatically you only need to install Docker itself.
You might also want to take a look in the docs:
- [podman docs](https://docs.podman.io/)
- [docker docs](https://docs.docker.com/)
You can try using Podman too because of their faster container startup times, but note that Podman and Docker are not always fully interchangeable. In case you want to follow this guide using podman, you will have to install the `docker` CLI to be able to run `docker compose` commands. You'll also have to enable the Podman socket. Refer to the podman docs for how to do that.
When using podman you want to make sure podman socket is enabled with:
```shell
sudo systemctl enable --now podman.socket
```
See:
- [Podman installation docs](https://podman.io/docs/installation)
- [Docker installation docs](https://docs.docker.com/engine/install)
- [Using `docker compose` with Podman](https://www.redhat.com/sysadmin/podman-docker-compose) (slightly outdated)
> [!NOTE]
> This will only work on linux systems since some kernel interfaces (like kvm) are needed by the vm. Because of this performance can vary in kernel versions (newer will likely perform better).
> [!NOTE]
> This will only work on Linux systems since some kernel interfaces (like KVM) are needed by the VM. Because of this performance can vary depending on kernel version (newer will likely perform better).
# Setup docker container
The easiest way to setup a windows vm is by using docker compose. Just create a `compose.yml` with following content:
The easiest way to set up a Windows VM is by using docker compose. A compose file that looks like this is already shipped with winapps:
```yaml
name: "winapps"
@ -49,28 +47,30 @@ services:
- data:/storage
```
Now you can tune the ram/usage by changing RAM_SIZE/CPU_CORES. You can also specify the windows versions you want to use. You might also want to take a look at the [docker image repo](https://github.com/dockur/windows).
Now you can tune the ram/usage by changing `RAM_SIZE` & `CPU_CORES`. You can also specify the windows versions you want to use. You might also want to take a look at the [repo of the Docker image](https://github.com/dockur/windows) for further information.
> [!NOTE]
> Older versions than Windows 10 are not officially supported. However they might still work with some additional tuning.
This compose file uses Windows 11 by default. You can use Windows 10 by changing the `VERSION` to `tiny10`.
> [!NOTE]
> We use a stripped-down Windows installation by default. This is recommended, but you can still opt for stock windows by changing the version to one of the versions listed in the README of the images repository linked above.
> [!NOTE]
> Older versions than Windows 10 are not officially supported by us. However they might still work with some additional tuning.
You can now just run:
```shell
docker compose up
docker compose up -d
```
to run the VM in the background.
After this just open http://127.0.0.1:8006 in your webbrowser and finish you windows installation as usual.
After this just open http://127.0.0.1:8006 in your web browser and wait for the Windows installation to finish.
> [!WARNING]
> Change the RDP_IP in your winapps config to localhost or "127.0.0.1".
> [!WARNING]
> Make sure to change the `RDP_IP` in your winapps config to `127.0.0.1`.
> [!WARNING]
> RDP will be automatically enabled, however you still need to load the [reg file](https://github.com/winapps-org/winapps/blob/main/install%2FRDPApps.reg) into you vm.
> Just use a browser inside the vm to download.
Now you should be ready to go and try to connect to your VM with winapps.
Now you should be ready to go and try to connect to your vm with winapps.
For stopping the vm just use:
For stopping the VM just use:
```shell
docker compose stop
```
@ -79,3 +79,5 @@ For starting again afterwards use:
```shell
docker compose start
```
(All compose commands have to be run from the directory where the `compose.yaml` is located.)