├── Dockerfile ├── README.md └── supervisord.conf /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.6 2 | LABEL maintainer=doug.warren@gmail.com 3 | 4 | ENV HOME=/root \ 5 | DEBIAN_FRONTEND=noninteractive \ 6 | LANG=en_US.UTF-8 \ 7 | LANGUAGE=en_US.UTF-8 \ 8 | LC_ALL=C.UTF-8 \ 9 | REMOTE_HOST=localhost \ 10 | REMOTE_PORT=5900 11 | 12 | RUN apk --update --upgrade add git bash supervisor nodejs nodejs-npm \ 13 | && git clone https://github.com/novnc/noVNC.git /root/noVNC \ 14 | && git clone https://github.com/novnc/websockify /root/noVNC/utils/websockify \ 15 | && rm -rf /root/noVNC/.git \ 16 | && rm -rf /root/noVNC/utils/websockify/.git \ 17 | && cd /root/noVNC \ 18 | && npm install npm@latest \ 19 | && npm install \ 20 | && ./utils/use_require.js --as commonjs --with-app \ 21 | && cp /root/noVNC/node_modules/requirejs/require.js /root/noVNC/build \ 22 | && sed -i -- "s/ps -p/ps -o pid | grep/g" /root/noVNC/utils/launch.sh \ 23 | && apk del git nodejs-npm nodejs 24 | 25 | COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf 26 | 27 | EXPOSE 8081 28 | 29 | CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Standalone NoVNC Container 2 | 3 | This image is intended to run a small standalone server that can target either other machines on the same network or other Docker containers. 4 | 5 | ## Configuration 6 | 7 | Two environment variables exist in the docker file for configuration REMOTE_HOST and REMOTE_PORT. 8 | 9 | ### Variables 10 | 11 | **REMOTE_HOST** Host running a VNC Server to connect to - defaults to *localhost* 12 | **REMOTE_PORT** Port that the VNC Server is listening on - defaults to *5900* 13 | 14 | ### Ports 15 | **8081** is exposed by default. 16 | 17 | ## Usage 18 | 19 | ``` 20 | docker run -d -e REMOTE_HOST=192.168.86.135 -e REMOTE_PORT=5901 dougw/novnc 21 | ``` 22 | 23 | 24 | -------------------------------------------------------------------------------- /supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:novnc] 5 | command=/root/noVNC/utils/launch.sh --vnc "%(ENV_REMOTE_HOST)s:%(ENV_REMOTE_PORT)s" --listen 8081 --web /root/noVNC/build/ 6 | autorestart=true 7 | --------------------------------------------------------------------------------