Install noVNC from GitHub

This commit is contained in:
Héctor Molinero Fernández 2019-09-15 20:55:14 +02:00
parent 473a8b4932
commit 81a66b5ee2
3 changed files with 17 additions and 4 deletions

View File

@ -19,8 +19,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \
ca-certificates \
curl \
net-tools \
novnc \
procps \
python3 \
python3-numpy \
qemu-kvm \
qemu-system-x86 \
qemu-utils \
@ -28,6 +29,18 @@ RUN export DEBIAN_FRONTEND=noninteractive \
unzip \
&& rm -rf /var/lib/apt/lists/*

# Install noVNC
ARG NOVNC_VERSION=v1.1.0
ARG NOVNC_TARBALL_URL=https://github.com/novnc/noVNC/archive/${NOVNC_VERSION}.tar.gz
RUN mkdir /opt/novnc/
RUN curl -sSfL "${NOVNC_TARBALL_URL:?}" | tar -xz --strip-components=1 -C /opt/novnc/

# Install Websockify
ARG WEBSOCKIFY_VERSION=v0.9.0
ARG WEBSOCKIFY_TARBALL_URL=https://github.com/novnc/websockify/archive/${WEBSOCKIFY_VERSION}.tar.gz
RUN mkdir -p /opt/novnc/utils/websockify/
RUN curl -sSfL "${WEBSOCKIFY_TARBALL_URL:?}" | tar -xz --strip-components=1 -C /opt/novnc/utils/websockify/

# Create data directories
RUN mkdir -p /var/lib/qemu/images/ /var/lib/qemu/iso/


View File

@ -2,6 +2,6 @@

set -eu

cd ~/
cd /opt/novnc/utils/websockify/
exec 2>&1
exec /usr/share/novnc/utils/launch.sh --listen 6080 --vnc localhost:5900
exec /usr/bin/python3 -m websockify --web /opt/novnc/ 6080 localhost:5900

View File

@ -13,6 +13,6 @@ 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

cd ~/
cd /var/lib/qemu/
exec 2>&1
exec "${QEMU:?}" ${QEMU_ARGS:?}