Giter Site home page Giter Site logo

vlu7109 / base-debian Goto Github PK

View Code? Open in Web Editor NEW

This project forked from desktopcontainers/base-debian

0.0 0.0 0.0 72 KB

base image for Desktop / X11 Applications (ssh X11, vnc, http/https novnc) on debian [x86 + arm]

Shell 65.58% Dockerfile 34.42%

base-debian's Introduction

Base Image for Desktop Applications on lightweight OpenBox Window Manager - (desktopcontainers/base-debian) [x86 + arm]

This container is created, to make it easy to use Desktop Applications on Systems that can run Docker Containers. It is based on _/debian and comes with various way to use your X11 applications:

I recommend using the desktopcontainers/base-alpine if possible. Only if you really need debian as base image, use this container.

The main reason to create this debian based desktop container was to support commercial software e.g. citrix icaclient, zoom etc. those often don't support the musl-libc and have problems running on alpine. Also those containers/software are often only x86 compatible.

  • VNC (port: 5900, no password)
  • HTTP VNC (port: 80, no password)
  • HTTPS VNC (port: 443, no password)
  • SSH X11 Forwarding (user: app, no password)
    • use it with ssh -X -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] -p 2222 /container/scripts/app (exported port 22 to 2222 on localhost)
    • use it with ssh -X -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no app@<CONTAINER IP ADRESS> /container/scripts/app
  • Local Native X11
    • start container using docker run --rm -ti -v "/tmp/.X11-unix:/tmp/.X11-unix" -v "$HOME/.Xauthority:/home/app/.Xauthority" -e "DISPLAY=$DISPLAY" -h $HOSTNAME --net=host --entrypoint=/container/scripts/app --user=app desktopcontainer/...

Changelogs

  • 2020-11-24
    • fixed failing arm builds on debian
  • 2020-11-12
    • default VNC_SCREEN_DEPTH to 24
  • 2020-11-11
    • complete rework
  • 2020-11-10
    • added kiosk mode
    • VNC_SCREEN_DEPTH support
  • 2020-11-09
    • initial creation on debian

Environment variables and defaults

General

  • SERVER_NAME

    • optional dns name for certificate generation
    • default: localhost
  • ENABLE_SUDO

    • set this to enable to allow the user to use sudo
    • default: not set
  • ENABLE_KIOSK

    • set this to enable to enable Kiosk mode
      • only run app and make sure it will always restart
      • it is advised to not combine with ENABLE_SUDO - but it's still possible to use with sudo enabled.
    • default: not set
    • perfect for (fullscreen) software like rdesktop, vncviewer, Browser etc.

VNC Settings

  • VNC_SCREEN_DEPTH

    • set the screen depth for the xfvb x-server
    • default: 24
    • other possible values:
      • 8
      • 16
      • 24
  • VNC_SCREEN_RESOLUTION

    • set this to a specific resolution like '1280x1024' if you want a specific default one
    • default: 1280x1024
    • depth is configured with VNC_SCREEN_DEPTH env
    • other possible values:
      • 640x480
      • 800x600
      • 1024x768
      • 1280x1024
      • 1280x720
      • 1280x800
      • 1280x960
      • 1360x768
      • 1400x1050
      • 1600x1200
      • 1680x1050
      • 1900x1200
      • 1920x1080
      • 1920x1200

Volumes

  • /certs/
    • store your certs with the $SERVER_NAME.[key|crt] here.
    • store your ssh host key ssh_host_rsa_key & ssh_host_rsa_key.pub here.
    • if they are missing, they get created

FAQ

  • use X11 Forwarding on a new macOS

API

If you wan't to use this container as base for your own containerized Desktop Applications, you can use the following informations to get it done.

It's best to configure everything in a Dockerfile and not at runtime.

Your custom Application

add all your code used for starting your application/s to /container/scripts/app.

Note: There are applications which get in trouble running in multiple instances. Since your Application get's started on container start on the VNC X11 Server, it might collide with the one which is started via SSH. If your application can only run once, make sure the app script kills all other instances before starting a new instance.

Init Points

Add commands to init phase of of entrypoint (only on first run/creation).

sed -i 's/# INIT PHASE/# INIT PHASE\nYOUR_COMMANDS_HERE/g' /container/scripts/entrypoint.sh

Add commands to run phase of of entrypoint (on every run).

sed -i 's/# PRE-RUN PHASE/# PRE-RUN PHASE\nYOUR_COMMANDS_HERE/g' /container/scripts/entrypoint.sh

Openbox Menu

Rename Menu Entry

sed -i 's/Application/NEW_ENTRY_NAME/g' /etc/xdg/openbox/menu.xml

Add Menu Entry

sed -i '0,/<item/ s,,<item label="NEW_ENTRY_NAME"><action name="Execute"><execute>NEW_ENTRY_COMMAND</execute></action></item>\n<item,' /etc/xdg/openbox/menu.xml

base-debian's People

Contributors

gregewing avatar marvambass avatar vlu7109 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.