From 81a66b5ee2f26057d203a0501261e62805559f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Sun, 15 Sep 2019 20:55:14 +0200 Subject: [PATCH] Install noVNC from GitHub --- Dockerfile | 15 ++++++++++++++- scripts/service/novnc/run | 4 ++-- scripts/service/qemu/run | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c6089d..68efa02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/ diff --git a/scripts/service/novnc/run b/scripts/service/novnc/run index 444abde..377ee85 100755 --- a/scripts/service/novnc/run +++ b/scripts/service/novnc/run @@ -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 diff --git a/scripts/service/qemu/run b/scripts/service/qemu/run index 0c1a5d8..6f11adb 100755 --- a/scripts/service/qemu/run +++ b/scripts/service/qemu/run @@ -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:?}