diff --git a/containers/MetaDesktop/Dockerfile b/containers/MetaDesktop/Dockerfile index ea43e98371c8cb7d3a6d40ec56f1cf80152d7250..9f43a61c59d419e44d16043d3fba2c1074106328 100644 --- a/containers/MetaDesktop/Dockerfile +++ b/containers/MetaDesktop/Dockerfile @@ -56,8 +56,9 @@ RUN cd /opt && wget https://bintray.com/tigervnc/stable/download_file?file_path= # Supervisord configuration COPY files/supervisord_vnc.conf /etc/supervisor/conf.d/ COPY files/run_vnc.sh /etc/supervisor/conf.d/ +COPY files/run_novnc.sh /etc/supervisor/conf.d/ RUN chmod 755 /etc/supervisor/conf.d/run_vnc.sh - +RUN chmod 755 /etc/supervisor/conf.d/run_novnc.sh # Web VNC (noVNC) v0.6.1. # NOTE: this is a custom version from Doro Wu (fcwu.tw@gmail.com). @@ -69,7 +70,7 @@ COPY files/index.html /usr/lib/noVNC RUN apt-get install -y net-tools # Supervisord configuration -COPY files/supervisord_webvnc.conf /etc/supervisor/conf.d/ +COPY files/supervisord_novnc.conf /etc/supervisor/conf.d/ # X environment setup/startup RUN apt-get install fluxbox -y diff --git a/containers/MetaDesktop/files/run_novnc.sh b/containers/MetaDesktop/files/run_novnc.sh new file mode 100755 index 0000000000000000000000000000000000000000..3caeaf8dae51bbde0aef86d92b38381f64754b92 --- /dev/null +++ b/containers/MetaDesktop/files/run_novnc.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Exec TigerVNC server + +if [ "x$TASK_PORT" == "x" ]; then + /usr/lib/noVNC/utils/launch.sh --listen 8590 + echo "Running noVN on port 8590" +else + /usr/lib/noVNC/utils/launch.sh --listen $TASK_PORT + echo "Running noVN on port $TASK_PORT" + +fi diff --git a/containers/MetaDesktop/files/supervisord_novnc.conf b/containers/MetaDesktop/files/supervisord_novnc.conf new file mode 100644 index 0000000000000000000000000000000000000000..abedb273d4af8e95a6e733ed952c9c118db36b7c --- /dev/null +++ b/containers/MetaDesktop/files/supervisord_novnc.conf @@ -0,0 +1,23 @@ +;======================================= +; noVNC service +;======================================= + +[program:novnc] + +; General +directory = /usr/lib/noVNC/ +command = /etc/supervisor/conf.d/run_novnc.sh +numprocs = 1 +autostart = true +autorestart = true +startsecs = 10 +stopwaitsecs = 30 +process_name = novnc + +; Standard out / error +stdout_logfile = /metauser/logs/%(program_name)s.log +stdout_logfile_maxbytes = 5MB +stdout_logfile_backups = 10 +stderr_logfile = /metauser/logs/%(program_name)s.log +stderr_logfile_maxbytes = 5MB +stderr_logfile_backups = 10