diff --git a/Dockerfile b/Dockerfile index c357e34..c14a8bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ # syntax=docker/dockerfile:1 FROM jayfield/novnc-baseimage +RUN apt-get update && \ + apt-get -y install --no-install-recommends openssl && \ + apt-get -y install --no-install-recommends net-tools socat && \ + rm -rf /var/lib/apt/lists/* + RUN openssl req -x509 -nodes -newkey rsa:2048 -keyout /tmp/novnc.key -out /tmp/novnc.pem -days 3650 -subj "/C=US/ST=NY/L=NY/O=NY/OU=NY/CN=NY emailAddress=email@example.com" ENV DISPLAY_NUM=99 ENV DISPLAY=:${DISPLAY_NUM} @@ -8,6 +13,7 @@ RUN touch /root/.Xauthority ADD scripts /opt/scripts/ +EXPOSE 60${DISPLAY_NUM} EXPOSE 5900 ENTRYPOINT ["/opt/scripts/server_start.sh", "/opt/scripts/server.sh"] diff --git a/scripts/server.sh b/scripts/server.sh index d852e00..f17a141 100755 --- a/scripts/server.sh +++ b/scripts/server.sh @@ -6,7 +6,7 @@ NOVNC_PORT=80${DISPLAY_NUM} echo Display at ${DISPLAY} with ${SCREEN_W}x${SCREEN_H}x24 /opt/TurboVNC/bin/Xvnc ${DISPLAY} -geometry ${SCREEN_W}x${SCREEN_H} -depth 24 +xinerama -securitytypes none >/var/log/xvfb.log & -icewm-session -o /var/log/icewm.log & +fluxbox & /tmp/websockify/run -D --web=/tmp/noVNC/ --cert=/tmp/novnc.pem --key=/tmp/novnc.key ${NOVNC_PORT} localhost:${RFB_PORT} socat TCP-LISTEN:60${DISPLAY_NUM},fork,bind=0.0.0.0 UNIX-CONNECT:/tmp/.X11-unix/X${DISPLAY_NUM}