docs: Readme

docs: Readme
This commit is contained in:
Kroese 2023-10-16 00:41:53 +02:00 committed by GitHub
commit 0e35e4a6d9

View File

@ -27,22 +27,22 @@ Via `docker-compose.yml`
```yaml ```yaml
version: "3" version: "3"
services: services:
dsm: dsm:
container_name: dsm container_name: dsm
image: kroese/virtual-dsm:latest image: kroese/virtual-dsm:latest
environment: environment:
DISK_SIZE: "16G" DISK_SIZE: "16G"
devices: devices:
- /dev/kvm - /dev/kvm
- /dev/vhost-net - /dev/vhost-net
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
ports: ports:
- 5000:5000 - 5000:5000
volumes: volumes:
- /opt/dsm:/storage - /opt/dsm:/storage
restart: on-failure restart: on-failure
stop_grace_period: 1m stop_grace_period: 1m
``` ```
Via `docker run` Via `docker run`
@ -59,7 +59,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
DISK_SIZE: "256G" DISK_SIZE: "256G"
``` ```
This can also be used to resize the existing disk to a larger capacity without data loss. This can also be used to resize the existing disk to a larger capacity without data loss.
@ -70,7 +70,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
volumes: volumes:
- /home/user/data:/storage - /home/user/data:/storage
``` ```
Replace the example path `/home/user/data` with the desired storage folder. Replace the example path `/home/user/data` with the desired storage folder.
@ -81,7 +81,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
ALLOCATE: "N" ALLOCATE: "N"
``` ```
Keep in mind that this will not affect any of your existing disks, it only applies to newly created disks. Keep in mind that this will not affect any of your existing disks, it only applies to newly created disks.
@ -92,8 +92,8 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
CPU_CORES: "4" CPU_CORES: "4"
RAM_SIZE: "2048M" RAM_SIZE: "2048M"
``` ```
* ### How do I verify if my system supports KVM? * ### How do I verify if my system supports KVM?
@ -127,16 +127,16 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
services: services:
dsm: dsm:
container_name: dsm container_name: dsm
..<snip>.. ..<snip>..
networks: networks:
vdsm: vdsm:
ipv4_address: 192.168.0.100 ipv4_address: 192.168.0.100
networks: networks:
vdsm: vdsm:
external: true external: true
``` ```
An added benefit of this approach is that you won't have to perform any port mapping anymore since all ports will be exposed by default. An added benefit of this approach is that you won't have to perform any port mapping anymore since all ports will be exposed by default.
@ -151,11 +151,11 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
DHCP: "Y" DHCP: "Y"
devices: devices:
- /dev/vhost-net - /dev/vhost-net
device_cgroup_rules: device_cgroup_rules:
- 'c *:* rwm' - 'c *:* rwm'
``` ```
Please note that even if you don't need DHCP, it's still recommended to enable this feature as it prevents NAT issues and increases performance by using a `macvtap` interface. Please note that even if you don't need DHCP, it's still recommended to enable this feature as it prevents NAT issues and increases performance by using a `macvtap` interface.
@ -166,7 +166,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
URL: "https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat" URL: "https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
``` ```
With this method, you are able to switch between different versions while keeping your file data. With this method, you are able to switch between different versions while keeping your file data.
@ -177,9 +177,9 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml ```yaml
environment: environment:
GPU: "Y" GPU: "Y"
devices: devices:
- /dev/dri - /dev/dri
``` ```
This can be used to enable facial recognition in Synology Photos for example. This can be used to enable facial recognition in Synology Photos for example.