Docker with GUI
October 31th, 2017
You need a docker image with GUI access? Something to render a file explorer, running a browser or the calculator? If yes, feel free to try out my demo docker image. If you are lazy, please watch the YouTube video below. If you want to have all commands ready for copy/paste, please read below the mini tutorial.
YouTube Video Tutorial (2 min)
Mini Tutorial
Step 1: pull image from Docker Hub
docker pull hackinglab/ubuntu-openbox-tigervnc-novnc-firefox-and-zapproxy
Step 2: run container on port 8080
docker run --rm -i -p 8080:80 hackinglab/ubuntu-openbox-tigervnc-novnc-firefox-and-zapproxy
Step 3: open your browser and go to localhost:8080
Step 4: Play around with the docker GUI
You can now run your linux tools visually in the firefox browser window. Starting another firefox instance will give you the browser in the browser functionality.
Step 5: Resize and Adjust Screen Resolution
The demo docker is capable of resizing to your browser video dimension. Follow the steps below and try it on your own. As you can see in the image below, resizing the firefox window will not automatically resize the GUI within the firefox window. This is very ugly.
But luck we have with the demo docker, one can delete everything after the “/” (blue color in image below) in the firefox URL bar and hit “ENTER”. This will resize the GUI within the firefox window.
If you hit http://localhost:8080/, the GUI will automatically resize within the firefox window.
And I think, this is awesome!
Disclaimer
This tutorial assumes you are testing the demo docker image on your local computer. Running and testing the demo docker on a remote host is absolutely possible and feasible, but you must change the IP address accordingly from localhost to the IP of your docker instance.
Thank you for Reading
Ivan Bütler
CEO Compass Security
ivan.buetler@compass-security.com