diff --git a/Dockerfile b/Dockerfile index 7408e9b..bbd8f0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,8 @@ ADD conf/ / ADD conf/ / RUN chmod +x /*.sh VOLUME ["/home/chrome"] + EXPOSE 5900 + ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/conf/chomevnc.sh b/conf/chomevnc.sh index af5c4bb..7244df9 100644 --- a/conf/chomevnc.sh +++ b/conf/chomevnc.sh @@ -5,8 +5,6 @@ [ -f /run/secrets/URL ] && URL="$(cat /run/secrets/URL)" URL="${URL:-https://www.docker.com/}" VNC_SERVER_PASSWORD=${VNC_SERVER_PASSWORD:-/run/secrets/vncpasswd} -#X11_W=${X11_W:-1920} -#X11_H=${X11_H:-1080} main() { log_i "Starting xvfb virtual display..." @@ -119,4 +117,4 @@ trap control_c SIGINT SIGTERM SIGHUP main -exit \ No newline at end of file +exit diff --git a/conf/entrypoint.sh b/conf/entrypoint.sh index e7dc9aa..579a2d5 100644 --- a/conf/entrypoint.sh +++ b/conf/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -echo ENTRY POINT +. ./env.sh # VNC default no password export X11VNC_AUTH="-nopw" @@ -23,12 +23,9 @@ done # override above if VNC_PASSWORD env var is set (insecure!) if [[ "$PASSWORD" != "" ]]; then - export X11VNC_AUTH="-passwd $PASSWORD" + echo $PASSWORD > /tmp/password + export X11VNC_AUTH="-rfbauth /tmp/password" + # export X11VNC_AUTH="-passwd $PASSWORD" fi -[ -z $X11_W ] && X11_W=1920 -[ -z $X11_H ] && X11_H=1080 -export X11_W -export X11_H - exec "$@" diff --git a/conf/env.sh b/conf/env.sh index 838d97b..b582f11 100644 --- a/conf/env.sh +++ b/conf/env.sh @@ -1,3 +1,3 @@ #!/bin/sh -X11_W=${X11_W:-1920} -X11_H=${X11_H:-1080} +X11_W=${X11_W:-1024} +X11_H=${X11_H:-768} diff --git a/conf/etc/supervisor/conf.d/supervisord.conf b/conf/etc/supervisor/conf.d/supervisord.conf index 9c694e2..b37a453 100644 --- a/conf/etc/supervisor/conf.d/supervisord.conf +++ b/conf/etc/supervisor/conf.d/supervisord.conf @@ -26,20 +26,3 @@ command=/usr/bin/x11vnc -display :1 %(ENV_X11VNC_AUTH)s -wait 5 -forever -xrandr user=chrome autorestart=true priority=300 - -#[program:xrdp-sesman] -#command=/usr/sbin/xrdp-sesman --nodaemon -#user=root -#process_name = xrdp-sesman -#autorestart=true -#priority=400 - -#[program:xrdp] -##command=/usr/sbin/xrdp -nodaemon -#command=/etc/init.d/xrdp restart -#user=root -#process_name = xrdp -#autorestart=true -#stderr_logfile=/var/log/xrdp-error.log -#stdout_logfile=/var/log/xrdp.log -#priority=500 diff --git a/conf/xvfb.sh b/conf/xvfb.sh index 7efc715..f3f19b2 100644 --- a/conf/xvfb.sh +++ b/conf/xvfb.sh @@ -1,3 +1,5 @@ #!/bin/sh +echo start xvfb.sh +echo ${X11_W}x${X11_H}x16 . /env.sh -/usr/bin/Xvfb :1 -screen 0 ${X11_W}x${X11_H}x24 +extension RANDR \ No newline at end of file +/usr/bin/Xvfb :1 -screen 0 ${X11_W}x${X11_H}x16 +extension RANDR