Code Monkey home page Code Monkey logo

docker.novnc's Introduction

noVNC Display Container

This image is intended to be used for displaying x11 applications from container in a browser.

  • Base image oraclelinux:7-slim

FYI https://github.com/rlagutinhub/docker_swarm-mode.novnc-internal-url


Image Contents

  • xvfb - x11 in a virtual framebuffer
  • x11vnc - a VNC server that scrapes the above X11 server
  • noVNC - a HTML5 canvas vnc viewer
  • fluxbox - a small window manager
  • conky - light-weight system monitor for X
  • xterm - to demo that it works
  • firefox - web browser developed by the Mozilla Foundation
  • supervisord - to keep it all running

Build image: docker build -f Dockerfile -t docker.novnc .

Usage

Variables

You can specify the following variables:

  • DISPLAY_WIDTH=<width> (1024)
  • DISPLAY_HEIGHT=<height> (768)
  • VNC_PASS=<password> (passw0rd)

Standalone

Run with default settings:

docker run -it --rm \
 --shm-size 256m \
 --stop-timeout 60 \
 --name vnc \
 --network bridge \
 -p 6080:6080/tcp \
 docker.novnc:latest

Run with custom settings:

docker run -dit \
 --shm-size 256m \
 --stop-timeout 60 \
 -e "DISPLAY_WIDTH=1920" \
 -e "DISPLAY_HEIGHT=899" \
 -e "VNC_PASS=123456" \
 --name vnc \
 --network=bridge \
 -p 6080:6080/tcp \
 docker.novnc:latest

alt text

Composition

Run with custom settings:

  • docker-compose -f docker-compose.yml -p "vnc" up --build -d
  • docker-compose -f docker-compose.yml -p "vnc" ps
  • docker-compose -f docker-compose.yml -p "vnc" stop
  • docker-compose -f docker-compose.yml -p "vnc" rm
version: '3.7'
services:
  vnc:
    image: docker.novnc:latest
    container_name: vnc
    shm_size: 256mb
    stop_grace_period: 1m
    network_mode: bridge
    # restart: always
    environment:
      - DISPLAY_WIDTH=1920
      - DISPLAY_HEIGHT=899
      - VNC_PASS=123456
    ports:
      - 6080:6080/tcp

Result

Open a browser and see the xterm and firefox demo at http://<server>:6080

alt text

On DockerHub / GitHub


docker.novnc's People

Contributors

rlagutinhub avatar

Stargazers

diego torres avatar  avatar

Watchers

James Cloos avatar diego torres avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.