Tuesday, October 11, 2016

Using GUI apps from docker on Windows host

So, you're looking for a way to use GUI apps from your Linux docker machine running on your Windows host? I bet you thought this would be really hard or impossible but it's actually incredibly easy.


  1. Install xming
    1. but don't launch xming
  2. Run your docker image with these extra parameters: -e DISPLAY={ip of docker virtual adapter}:0.0
    1. eg. docker run -e DISPLAY= -it quay.io/travisci/travis-
      node-js /bin/bash
  3. Find your xming folder and open X0.hosts
  4. Add the ip of the docker machine on a new line and save
    • docker should have displayed the ip when you opened your docker console 
    • alternatively you can simply try running the docker image and then locating the ip address at the bottom of the Xming log which can be found by right clicking on the Xming taskbar icon and choosing "View logs".
  5. Launch xming
  6. Run your GUI app from docker!


I've only tested this with Firefox using a Windows 10 host.


windows 7 - How to use x11 forwarding with PuTTY
Running Linux GUI Apps in Windows (using cygwin/X)