Small example shows how to run a gui-App inside docker on a Windows-host.
To forward the GUI to the Windows-host we need a X-server running on the host.
Xming is the leading X Window System Server for Microsoft Windows.
http://www.straightrunning.com/XmingNotes/
- Download a Public Domain Release from http://www.straightrunning.com/XmingNotes/, e.g.
Xming Xming-mesa 6.9.0.31
from http://sourceforge.net/projects/xming/files/Xming-mesa/6.9.0.31/Xming-mesa-6-9-0-31-setup.exe/download - Install by following the installation-wizzard
- After the installation restart
Start the XLaunch
and adopt the following configuration for particular screens:
- Select display Settings Multiple Windows, Display Number: 0
- Select to start Xming Start no client
- Specify parameter settings Clipboard, No Access Control
We have to provide additional data to the run command of docker. The following commands are executed in the PowerShell.
- Get the docker container
docker pull handflucht/guiappindockeronwindows
- Get the IP of the host
PS C:\> ipconfig
Windows-IP-Konfiguration
[...]
Drahtlos-LAN-Adapter WLAN:
Verbindungsspezifisches DNS-Suffix: localdomain
Verbindungslokale IPv6-Adresse . : ...
IPv4-Adresse . . . . . . . . . . : 192.168.1.5
Subnetzmaske . . . . . . . . . . : ...
Standardgateway . . . . . . . . . : ...
- Define variable
set-variable -name DISPLAY -value 192.168.1.5:0.0
- Start docker
docker run -ti --rm -e DISPLAY=$DISPLAY handflucht/guiappindockeronwindows
Now a new window will open showing Firefox running inside.
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Broadway display type not supported: 192.168.1.5:0
Error: cannot open display: 192.168.1.5:0
X-server is not running. Use the lauch-tool to configure the server correctly.