Can you run GUI apps on Docker? Should you even try? Those are questions few people are asking so far. But as Docker continues to become a leading app deployment platform, it may be time to start thinking about how Docker can support desktop GUI apps.
By “GUI app,” I mean one that has a graphical interface delivered through video rather than a web browser. Lots of Dockerized applications already make interfaces available inside a browser, but very few allow you to interact with an app through a protocol such as X11.
There are exceptions. Fábio Rehm shows how to make Firefox run inside a container using X11 forwarding so that users can interact with the browser graphically. Another option is to use VNC to make a video display from a containerized application accessible from outside the container.
Is Docker Useful for GUI Applications?
If you’ve read this far, you may be wondering, “What’s the point?”
If you use Docker, you almost certainly do so within the context of software development or data center deployment. The idea of using Docker to install and run GUI apps—which you’re much likelier to find on a desktop PC than on a server—likely seems foreign.
Fair enough. In some respects, it’s hard to see the value of Docker for desktop apps. One of the main selling points of Docker is that it allows you to deploy apps quickly in a distributed environment composed of servers, and to move the apps around as needed. On the desktop, cluster environments and app portability are not very important.
On the other hand, Docker could help solve some challenges associated with desktop apps. For example, it could enable truly platform-agnostic app packages. We’ve come a long way since the days when you had to compile your app from source to make it run on your system. But most installation packages available today are still tied to a particular Linux distribution or version of Windows. With Docker, it finally would be possible to have a single package format for installing a given application on any Linux or Windows system. (Of course, you’d still be subject to the limitation of not being able to run Dockerized Linux apps on a Windows system, and vice versa, but that is a separate issue.)
Docker and GUI apps for Windows Server
More important, GUI-enabled Docker apps are likely to become essential as Docker continues to grow within the Windows server world. As of September, Docker offers native support for Windows Server 2016. In the Windows server world, much more than in the Linux one, GUI interfaces are common for configuring and managing apps. For example, if you want to run the IIS web server inside Docker, it would be handy to be able to manage it graphically, since IIS was not really designed for CLI management. (Sure, you can do it, but if you’re a Windows admin, you probably don’t want to.)
The bottom line: If Docker is going to keep expanding into new niches, sooner or later it will need to offer more robust support for exporting video from containers in order to accommodate GUI apps. The existing evidence shows that this is certainly possible to do. But a more streamlined solution will be important, especially for Windows server admins who want to leverage Docker.