Giter VIP home page Giter VIP logo

dockerfile-xpra's Introduction

dockerfile-xpra

Simple example of using xpra inside a docker container. This example uses Xdummy with xpra which is required to use opengl. See the branch no-gl for an example that uses the standard Xvfb with xpra.

Usage

Make sure you are in the same directory as the Dockerfile

cd dockerfile-xpra

Build the image and tag it xpra. The -rm options cleans the cache after the final image ha been created.

docker build -t xpra -rm .

Run it, mapping the 22 port in the container to 1022 on the host.

docker run -i -t -p 1022:22 xpra

In a separate terminal connect to xpra running in the container. The password is changeme.

xpra attach --ssh="ssh -p 1022" ssh:xpra@localhost:100

If you return to the first terminal and hit any key then glxgears will launch on the host. If you already hit any key then glxgears will open on the host as soon as you attached to xpra. I only added the extra need to press a key before launching glxgears because I intend to use this example to run applications that may contain intros (eg. Dwarf Fortress).

Todo

  • The line that prints start.sh is too long, it would be good to extract common functionality into separate utilities that can be fetched from gitub. I do not include it as a separate file since I want the Dockerfile to be as self contained as possible.

dockerfile-xpra's People

Contributors

bencawkwell avatar catherineh avatar yaguangtang avatar

Watchers

 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.