Added more environment variables

This commit is contained in:
Héctor Molinero Fernández 2019-03-07 21:50:38 +01:00
parent be0a6f8555
commit 173b808436
3 changed files with 19 additions and 3 deletions

View File

@ -6,6 +6,10 @@ ENV QEMU_RAM=1024M
ENV QEMU_DISK_SIZE=16G
ENV QEMU_DISK_FORMAT=qcow2
ENV QEMU_KEYBOARD=en-us
ENV QEMU_NET_DEVICE=rtl8139
ENV QEMU_NET_OPTIONS=hostfwd=tcp::13389-:3389,hostfwd=tcp::15900-:5900
ENV QEMU_BOOT_ORDER=cd
ENV QEMU_BOOT_MENU=off
ENV QEMU_KVM=false

# Install system packages
@ -42,7 +46,10 @@ COPY --chown=root:root scripts/service/ /etc/service/
# Copy scripts
COPY --chown=root:root scripts/bin/ /usr/local/bin/

# Expose noVNC port
# Expose ports
## VNC
EXPOSE 5900/tcp
## noVNC
EXPOSE 6080/tcp

CMD ["/usr/local/bin/docker-foreground-cmd"]

View File

@ -29,6 +29,15 @@ VM disk format (`qcow2` by default).
#### `QEMU_KEYBOARD`
VM keyboard layout (`en-us` by default).

#### `QEMU_NET_DEVICE`
VM network device (`rtl8139` by default).

#### `QEMU_BOOT_ORDER`
VM boot order (`cd` by default).

#### `QEMU_BOOT_MENU`
VM boot menu (`off` by default).

#### `QEMU_KVM`
Start QEMU in KVM mode (`false` by default).
> The `--privileged` option is required to use KVM in the container.

View File

@ -7,8 +7,8 @@ QEMU_ARGS="${QEMU_ARGS-} -smp ${QEMU_CPU} -m ${QEMU_RAM}"
QEMU_ARGS="${QEMU_ARGS-} -vga std -display vnc=:0"
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/images/reactos.img,index=0,media=disk,format=${QEMU_DISK_FORMAT}"
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/iso/reactos.iso,index=2,media=cdrom,format=raw"
QEMU_ARGS="${QEMU_ARGS-} -boot order=cd,menu=on,splash-time=5000"
QEMU_ARGS="${QEMU_ARGS-} -netdev user,id=n0,hostfwd=tcp::13389-:3389,hostfwd=tcp::15900-:5900 -device rtl8139,netdev=n0"
QEMU_ARGS="${QEMU_ARGS-} -boot order=${QEMU_BOOT_ORDER},menu=${QEMU_BOOT_MENU},splash-time=5000"
QEMU_ARGS="${QEMU_ARGS-} -netdev user,id=n0,${QEMU_NET_OPTIONS} -device ${QEMU_NET_DEVICE},netdev=n0"
QEMU_ARGS="${QEMU_ARGS-} -usb -device usb-tablet"
QEMU_ARGS="${QEMU_ARGS-} -k ${QEMU_KEYBOARD}"
if [ "${QEMU_KVM}" = true ]; then QEMU_ARGS="${QEMU_ARGS-} -enable-kvm"; fi