From 0a605cf2265994d2ce810f93f34f38d50acc15ec Mon Sep 17 00:00:00 2001 From: butomo1989 Date: Thu, 6 Apr 2017 10:29:27 +0200 Subject: [PATCH] Fixed noVNC --- Dockerfile | 25 ++++++++++++++++--------- supervisord.conf | 2 +- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc755da..ef0fda3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,6 @@ WORKDIR /root #================== # General Packages #------------------ -# git -# Clone git repository # wget # Network downloader # unzip @@ -52,7 +50,6 @@ WORKDIR /root # bridge-utils #================== RUN apt-get update && apt-get install -y --no-install-recommends \ - git \ wget \ unzip \ curl \ @@ -72,11 +69,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ bridge-utils \ && rm -rf /var/lib/apt/lists/* -#====================== -# Clone noVNC projects -#====================== -RUN git clone https://github.com/kanaka/noVNC.git \ - && cd noVNC/utils && git clone https://github.com/kanaka/websockify websockify +#======= +# noVNC +# Use same commit id that docker-selenium uses +# https://github.com/elgalu/docker-selenium/blob/236b861177bd2917d864e52291114b1f5e4540d7/Dockerfile#L412-L413 +#======= +ENV NOVNC_SHA="b403cb92fb8de82d04f305b4f14fa978003890d7" \ + WEBSOCKIFY_SHA="558a6439f14b0d85a31145541745e25c255d576b" +RUN wget -O noVNC.zip "https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}.zip" \ + && unzip -x noVNC.zip \ + && rm noVNC.zip \ + && mv noVNC-${NOVNC_SHA} noVNC \ + && wget -O websockify.zip "https://github.com/kanaka/websockify/archive/${WEBSOCKIFY_SHA}.zip" \ + && unzip -x websockify.zip \ + && mv websockify-${WEBSOCKIFY_SHA} ./noVNC/utils/websockify \ + && rm websockify.zip \ + && ln noVNC/vnc_auto.html noVNC/index.html #===================== # Install Android SDK @@ -133,7 +141,6 @@ ENV DISPLAY=:0 \ TARGET_PORT=6080 \ TIMEOUT=1 \ LOG_PATH=/var/log/supervisor -RUN ln -s noVNC/vnc_auto.html noVNC/index.html #=============== # Expose Ports diff --git a/supervisord.conf b/supervisord.conf index c05e261..965cad4 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -14,7 +14,7 @@ stdout_logfile=%(ENV_LOG_PATH)s/openbox.stdout.log stderr_logfile=%(ENV_LOG_PATH)s/openbox.stderr.log [program:x11vnc] -command=/usr/bin/x11vnc -display %(ENV_DISPLAY)s -nopw -ncache 10 -forever +command=/usr/bin/x11vnc -display %(ENV_DISPLAY)s -nopw -forever -shared stdout_logfile=%(ENV_LOG_PATH)s/x11vnc.stdout.log stderr_logfile=%(ENV_LOG_PATH)s/x11vnc.stderr.log