winapps-org / winapps

The winapps main project, forked from https://github.com/Fmstrat/winapps/
Other
998 stars 45 forks source link

Add docker documentation for legacy winapps #94

Closed LDprg closed 4 months ago

LDprg commented 4 months ago

Docker seems a better option for hosting the vm.

Thid Pr adds documentation on how to use docker with legacy winapps.

oskardotglobal commented 4 months ago

This is my compose file, in case you need it

name: "winapps"

volumes:
  data:

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "core11"
      RAM_SIZE: "8G"
      CPU_CORES: "4"
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    restart: on-failure
    volumes:
      - data:/storage
oskardotglobal commented 4 months ago

The only step I had to take was to manually install the .reg file, but that can be automated

LDprg commented 4 months ago

The only change I would make to your docker compose is to set privileged to true and remove the device/capp_add section. There could be some trouble about permissions if not done so (on my system for example docker wasn't able to access my network interface). It would also simplify gpu passthrough (since devices do not need to be listed twice) at the cost of some not that important security.

oskardotglobal commented 4 months ago

Make sure to mention that the RDP_IP has to be set to localhost or 127.0.0.1 (which might lead to better compatibility) in the config explicitely

oskardotglobal commented 4 months ago

Also, we might wanna use bind mounts instead of named volumes by default

LDprg commented 4 months ago

Also, we might wanna use bind mounts instead of named volumes by default

I feel like we should do it the other way around. Use volumes as default and mention bind mounts (or maybe even recommend). Since Volumes are more independent and easier to setup on a just works system.

oskardotglobal commented 4 months ago

My reason behind bind mounts would be to allow access to the guest's fs easily

oskardotglobal commented 4 months ago

or wait, the mount contains a disk image, doesn't it yeah then volumes are better

LDprg commented 4 months ago

In general this is ready for review. I will also do a quick rebase later.

LDprg commented 4 months ago

All stuff should be fixed