If you pay attention to what sysadmins and Linux users are saying, they’re really excited about something called Docker. But what is it, exactly? And why should you care? Who’s using Docker anyway? This article will help explain the appeal of Docker.
What is Docker?
Docker is a way to package applications into "containers" that allow them to be moved from machine to machine. It has special appeal for developers and system administrators because it lets them ship applications around and still have them work, along with all of their dependencies.
For example, a developer can test and build a Web application using a LAMP (Linux, Apache, MySQL, PHP) on a personal machine and then push the apps to a testing server with containerized versions of the apps and all the components, including a minimal Ubuntu installation, with the guarantee that they’ll work from machine to machine. This makes it easier for developers to test and roll out new applications quickly.
Docker provides a level of abstraction above the actual Linux operating system, but without the overhead of a full-blown virtual machine. Docker is a sort of middle ground between the two. It’s a lightweight alternative to virtual machines, as virtual machines require a complete operating system to run, while containers just use the components that are required.
True to the open-source spirit, there are a number of repositories of Docker containers, including on Docker’s own website. It’s similar to the various package managers that Linux distributions use. A number of the companies using Docker mentioned later in the article maintain their own public repositories. Companies can also create private repositories for internal use.
Docker operates in a distributed architecture, with a daemon managing the containers, and a client that manages requests. Docker makes use of LXC, which enables the use of containers right in the Linux kernel.
Why Is It So Popular?
If you pay attention to the Linux world, you may wonder if the hype around Docker is justified. The reason system administrators and developers love Docker so much is that it makes their jobs a lot easier, since they can push their code from different machines, even all the way up into cloud services.
Why Should You Use Docker?
Docker takes a lot of the headaches out of running distributed Web applications. If your application depends on a certain version of Apache or MySQL, you can use a Dockerized version without disturbing any other components on the system. This means that if you are running an application on a large server farm, you can ensure that all of the nodes are running the same software. This makes testing and troubleshooting much easier than trying to manage installations of different versions across large numbers of servers.
Who’s Using Docker?
Although Docker is pretty new, it’s being embraced by a wide variety of major tech companies, including Yelp, Spotify, Rackspace and eBay, among others. A lot of them have made their own repositories available to other people on Docker’s website.
Even Microsoft is supporting Docker on its Azure cloud computing platform. It’s surprising, given Microsoft’s hostility toward Linux in the past, that it also allows users to run Linux on its cloud platform instead of Windows. In both cases, it’s just Microsoft giving their customers what they want.
Docker or Virtualization?
Docker eliminates a lot of the overhead of virtualization, but there might be some times that you need to run a virtual machine. You might really need to take advantage of some operating system features. Since Docker depends on Linux kernel features, you’re really tied to the Linux platform. If you wanted to use Windows or BSD features, you’re better off with virtualization.
If you’re looking to make it easier to develop and test applications and move them and and their dependencies from machine to machine, Docker might be an ideal choice for you. You don’t have to worry about whether your hosting provider will have the right version of Ubuntu or MySQL, because they can just be installed as containers on the target system.