1
0
Fork
You've already forked docker-opengl
0
A docker image that supports rendering graphical applications. Originally forked from https://github.com/chanb/docker-opengl, which in turn was a fork of a fork of https://github.com/thewtex/docker-opengl. https://davejansen.dev/davejansen/docker-opengl
  • Shell 46.8%
  • Dockerfile 26.4%
  • Python 19.4%
  • Makefile 7.4%
Find a file
Jean-Christophe Fillion-Robin 0fd6c483dd Merge pull request #15 from thewtex/continuous-update-of-graphical-app-log
Update graphical-app-launcher to allow continuous update of "graphica...
2017年05月12日 15:53:39 -04:00
etc Configure supervisor-stdout to redirect graphical-app output 2017年05月12日 15:45:10 -04:00
example Use the Makefile to build the example 2016年10月20日 17:09:46 -04:00
usr/bin Update graphical-app-launcher to allow continuous update of "graphical-app-launcher.log" 2017年05月12日 15:35:52 -04:00
circle.yml Login with DockerHub for deployment 2016年10月20日 17:31:05 -04:00
Dockerfile Fix "cannot import name 'IncompleteRead'" reported when building the image 2017年05月12日 09:13:27 -04:00
LICENSE Initial commit. 2015年10月28日 13:06:08 -04:00
Makefile ENH: Add MicroBadger Label Schema 2016年10月24日 16:31:16 -04:00
README.rst ENH: Use MicroBadger in README file 2016年10月24日 16:31:44 -04:00
run.sh Use bash instead of sh. 2016年04月09日 14:16:00 -04:00

docker-opengl

A docker image that supports rendering graphical applications, including OpenGL apps.

image

image

Overview

This Docker image supports portable, CPU-based graphical application rendering, including rendering OpenGL-based applications. An X session is running on display :0 and can be viewed through HTML5 viewer on any device with a modern web browser (Mac OSX, Windows, Linux, Android, iOS, ChromeOS, ...). It can be used to expose a graphical interface from a Docker container or to run continuous integration tests that require a graphical environment.

Quick-start

Execute the run.sh script.

Details

By default, the run.sh start up the graphical session and points the user to a URL on the local host where they can view and interact with the session. On application exit, the run.sh will print the application's console output and exit with the application's return code.

The session runs Openbox as a non-root user, user that has password-less sudo privileges. The browser view is an HTML5 viewer that talks over websockets to a VNC Server. The VNC Server displays a running Xdummy session.

To customize the Docker image for your graphical application, set the APP environmental variable to the shell command required to start the application. For example:

ENV APP /usr/bin/my-gui-app

The run.sh script can be used to drive start-up. It is customizable with flags:

Usage: run.sh [-h] [-q] [-c CONTAINER] [-i IMAGE] [-p PORT] [-r DOCKER_RUN_FLAGS]
This script is a convenience script to run Docker images based on
thewtex/opengl. It:
- Makes sure docker is available
- On Windows and Mac OSX, creates a docker machine if required
- Informs the user of the URL to access the container with a web browser
- Stops and removes containers from previous runs to avoid conflicts
- Mounts the present working directory to /home/user/work on Linux and Mac OSX
- Prints out the graphical app output log following execution
- Exits with the same return code as the graphical app
Options:
 -h Display this help and exit.
 -c Container name to use (default opengl).
 -i Image name (default thewtex/opengl).
 -p Port to expose HTTP server (default 6080). If an empty
 string, the port is not exposed.
 -r Extra arguments to pass to 'docker run'. E.g.
 --env="APP=glxgears"
 -q Do not output informational messages.

See the example directory for a derived image and run.sh script that runs the glxgears OpenGL demo program.

Credits

This configuration was largely inspired by the dit4c project.