fix: Default RAM size

* fix: Default RAM size
This commit is contained in:
Kroese 2023-12-03 09:53:07 +01:00 committed by GitHub
parent 7ad3c6bfb6
commit c1992a7772
4 changed files with 9 additions and 8 deletions

View file

@ -27,8 +27,8 @@ EXPOSE 22
EXPOSE 5900 EXPOSE 5900
ENV CPU_CORES "1" ENV CPU_CORES "1"
ENV RAM_SIZE "1G"
ENV DISK_SIZE "16G" ENV DISK_SIZE "16G"
ENV RAM_SIZE "512M"
ENV BOOT "http://www.example.com/image.iso" ENV BOOT "http://www.example.com/image.iso"
ARG VERSION_ARG="0.0" ARG VERSION_ARG="0.0"

View file

@ -5,12 +5,13 @@ services:
image: qemux/qemu-docker:latest image: qemux/qemu-docker:latest
environment: environment:
DISPLAY: "vnc" DISPLAY: "vnc"
RAM_SIZE: "1G"
CPU_CORES: "1" CPU_CORES: "1"
RAM_SIZE: "512M"
DISK_SIZE: "16G" DISK_SIZE: "16G"
BOOT: "https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-standard-3.18.2-x86_64.iso" BOOT: "https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-standard-3.18.2-x86_64.iso"
devices: devices:
- /dev/kvm - /dev/kvm
- /dev/net/tun
- /dev/vhost-net - /dev/vhost-net
device_cgroup_rules: device_cgroup_rules:
- 'c *:* rwm' - 'c *:* rwm'

View file

@ -69,10 +69,10 @@ docker run -it --rm -e "BOOT=http://www.example.com/image.iso" --device=/dev/kvm
```yaml ```yaml
environment: environment:
DISK_SIZE: "256G" DISK_SIZE: "128G"
``` ```
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 any data loss.
* ### How do I change the location of the data disk? * ### How do I change the location of the data disk?
@ -87,12 +87,12 @@ docker run -it --rm -e "BOOT=http://www.example.com/image.iso" --device=/dev/kvm
* ### How do I increase the amount of CPU or RAM? * ### How do I increase the amount of CPU or RAM?
By default, a single core and 512 MB of RAM are allocated to the container. To increase this, add the following environment variables: By default, a single core and 1 GB of RAM are allocated to the container. To increase this, add the following environment variables:
```yaml ```yaml
environment: environment:
RAM_SIZE: "4G"
CPU_CORES: "4" CPU_CORES: "4"
RAM_SIZE: "2048M"
``` ```
* ### How do I verify if my system supports KVM? * ### How do I verify if my system supports KVM?

View file

@ -15,8 +15,8 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
: ${ALLOCATE:='Y'} # Preallocate diskspace : ${ALLOCATE:='Y'} # Preallocate diskspace
: ${ARGUMENTS:=''} # Extra QEMU parameters : ${ARGUMENTS:=''} # Extra QEMU parameters
: ${CPU_CORES:='1'} # Amount of CPU cores : ${CPU_CORES:='1'} # Amount of CPU cores
: ${RAM_SIZE:='1G'} # Maximum RAM amount
: ${DISK_SIZE:='16G'} # Initial data disk size : ${DISK_SIZE:='16G'} # Initial data disk size
: ${RAM_SIZE:='512M'} # Maximum RAM amount
# Helper variables # Helper variables