Running GUI Applications in Docker — Firefox, Nautilus File Manager.

Muhammad Tabish Khanday
Jan 12 · 4 min read
Image for post
Image for post
docker

What is Docker?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that the machine might have that could differ from the machine used for writing and testing the code.

Types of applications (usually services) that you can containerize:

  • Applications that run as a Background Service (like a Database, WebServer, etc)
  • GUI Applications that run in the foreground.

X Window System/ X:

X11 is the current version of the X Window System.

Image for post
Image for post
wikipedia.com
Image for post
Image for post
wikipedia.com
Image for post
Image for post

Example 1: Dockerfile to build an image with a sample GUI application (Firefox):

$ cat Dockerfile

Image for post
Image for post
Image for post
Image for post

Example 2: Dockerfile to build an image with a sample GUI application (Nautilus File Manager):

$ cat Dockerfile

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

The Startup

Medium's largest active publication, followed by +775K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store