暂无描述

Mettbrot c7d50bcae6 Update Docker to use debian buster 4 年之前
conf.d caf9442b12 Add -ac option to allow remote connection to Xvfb 5 年之前
Dockerfile c7d50bcae6 Update Docker to use debian buster 4 年之前
LICENSE 58710a73d8 Initial commit 7 年之前
README.md 417a78f1d8 Remove socat for better X11 performance 5 年之前
docker-compose.yml 5a19d74b4e s/psharkey/theasp/ in a few places 7 年之前
entrypoint.sh 22e1c593c4 Add RUN_FLUXBOX and RUN_XTERM variables 7 年之前
supervisord.conf 2230672ba3 Split supervisord.conf into /app/conf.d/*.conf 7 年之前

README.md

noVNC Display Container

This image is intended to be used for displaying X11 applications from other containers in a browser. A stand-alone demo as well as a Version 2 composition.

Image Contents

  • Xvfb - X11 in a virtual framebuffer
  • x11vnc - A VNC server that scrapes the above X11 server
  • noNVC - A HTML5 canvas vnc viewer
  • Fluxbox - a small window manager
  • xterm - to demo that it works
  • supervisord - to keep it all running

Usage

Variables

You can specify the following variables:

  • DISPLAY_WIDTH=<width> (1024)
  • DISPLAY_HEIGHT=<height> (768)
  • RUN_XTERM={yes|no} (yes)
  • RUN_FLUXBOX={yes|no} (yes)

Stand-alone Demo

Run:

$ docker run --rm -it -p 8080:8080 theasp/novnc

Open a browser and see the xterm demo at http://<server>:8080/vnc.html

V2 Composition

A version of the V2 docker-compose example is shown below to illustrate how this image can be used to greatly simplify the use of X11 applications in other containers. With just docker-compose up -d, your favorite IDE can be accessed via a browser.

Some notable features:

  • An x11 network is defined to link the IDE and novnc containers
  • The IDE DISPLAY environment variable is set using the novnc container name
  • The screen size is adjustable to suit your preferences via environment variables
  • The only exposed port is for HTTP browser connections

    version: '2'
    services:
    ide:
    image: psharkey/intellij:latest
    #    image: psharkey/netbeans-8.1:latest
    environment:
      - DISPLAY=novnc:0.0
    depends_on:
      - novnc
    networks:
      - x11
    novnc:
    image: theasp/novnc:latest
    environment:
      # Adjust to your screen size
      - DISPLAY_WIDTH=1600
      - DISPLAY_HEIGHT=968
      - RUN_XTERM=no
    ports:
      - "8080:8080"
    networks:
      - x11
    networks:
    x11:
    

If the IDE fails to start simply run docker-compose restart <container-name>.

On DockerHub / GitHub


Thanks


This is based on the alpine container by @psharkey: https://github.com/psharkey/docker/tree/master/novnc Based on wine-x11-novnc-docker and octave-x11-novnc-docker.