4 Reasons to Use Docker on Your Linux Desktop

Most Docker use cases involve deploying applications on servers. But Docker also can be a great tool for a desktop Linux system. Here’s why.

I know: Most folks don’t use desktop Linux. Even developers who create applications to run on Linux servers typically use Windows or macOS systems for their work.

But for those of us who do live and die by desktop Linux, Docker containers enable several handy features that make Linux even more fun and easy to use as a PC operating system.

Installing Software

If you use desktop Linux, you know that installing new applications tends to fall into one of two categories: It’s either extremely easy or a complete nightmare.

As long as the application you want to install is in your Linux distribution’s package repositories, installing it involves just a few clicks or commands.

On the other hand, if the application isn’t in the repos (or if you need a different version than the one in the repos, or the repo package has dependencies that you can’t automatically satisfy), attempting to install it can be a disaster. You end up having to force-install a package that wasn’t designed for your system, convert an RPM to a Debian package, attempt to compile from source (which rarely actually works) and so on.

In the latter situation, Docker can save the day. With Docker, you can download and install an application from Docker Hub or another large, centralized container image repository in a few clicks. And because Docker images don’t care which Linux distribution you are using or require complex dependencies, there is much less that can go wrong when trying to install an application in this way.

Removing Software

Removing applications from a desktop Linux system is also either extremely easy or extremely messy.

As long as you installed the application using a supported package, your package manager can usually uninstall it cleanly without much fuss.

But if you installed an application from source, or if the application left behind data or configuration files in weird places, removing it from your system without leaving cruft behind is pretty tricky.

With Docker, you don’t have to worry about any of this. Your Docker containers run in isolated environments without modifying the rest of your system. You can remove container images without leaving any muck behind.

Running Different Versions of the Same Application

Sometimes, you have one version of an application installed, but you want to use a different version of it without having to install the same one.

For example, maybe you want to install different versions of Python so that you can test out an app you are writing under multiple Python releases.

Some Linux distributions provide tools to help you do this, such as Software Collections from Red Hat.

Arguably, however, Docker containers are an even better solution. With Docker, you can pull the image for a containerized application and specify exactly which version you want. You can also easily run containers based on different versions of the same application at the same time.

Testing New Operating Systems

If you’re a desktop Linux geek, you probably can’t resist the temptation to try out new Linux distributions from time to time.

In the past, doing so required you either to reboot your computer into a new system or use a virtual machine to test it out.

With Docker containers, however, you can download, boot up and poke around a new Linux distribution in a few clicks—again, without having to muck up the configuration of your main system.

Granted, you won’t be able to test graphical interfaces in most cases. But at least you can get a feel for how the new system works. And if you’re a true desktop Linux geek, you probably don’t care much about the graphical interface, anyway.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.

Christopher Tozzi has 254 posts and counting. See all posts by Christopher Tozzi