Merge pull request #168 from trinhpham/master

Fixed vnc issue while clicking/dragging mouse and reduced image size
This commit is contained in:
Budi Utomo 2019-07-02 11:27:40 +02:00 committed by GitHub
commit cd2a7a5bcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 13 deletions

View file

@ -7,6 +7,18 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
@ -21,6 +33,7 @@ WORKDIR /root
#------------------
# x11vnc
# VNC server for X display
# We use package from ubuntu 18.10 to fix crashing issue
# openbox
# Windows manager
# menu
@ -46,6 +59,8 @@ WORKDIR /root
# ubuntu-vm-builder
# bridge-utils
#==================
ADD docker/sources1810.list /etc/apt/sources.list.d/
ADD docker/x11vnc.pref /etc/apt/preferences.d/
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
xterm \
supervisor \
@ -61,20 +76,9 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
libvirt-bin \
ubuntu-vm-builder \
bridge-utils \
&& apt clean all \
&& rm -rf /var/lib/apt/lists/*
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#=======
# noVNC
# Use same commit id that docker-selenium uses

2
docker/sources1810.list Normal file
View file

@ -0,0 +1,2 @@
deb http://archive.ubuntu.com/ubuntu/ cosmic main restricted universe
deb http://security.ubuntu.com/ubuntu/ cosmic-security main restricted universe

6
docker/x11vnc.pref Normal file
View file

@ -0,0 +1,6 @@
Package: *
Pin: release n=bionic
Pin-Priority: -10
Package: x11vnc*
Pin: release n=cosmic
Pin-Priority: 500

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Bash version should >= 4 to be able to run this script.
IMAGE="budtmo/docker-android"
IMAGE="${DOCKER_ORG:-budtmo}/docker-android"
if [ -z "$1" ]; then
read -p "Task (test|build|push|all) : " TASK

View file

@ -21,6 +21,7 @@ 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
priority=2
autorestart=true
[program:novnc]
command=./noVNC/utils/launch.sh --vnc localhost:%(ENV_LOCAL_PORT)s --listen %(ENV_TARGET_PORT)s