Docker Considered Harmful (2016)
I think that Docker became popular because of very limited functionality of distributions&#x27; package managers that doesn&#x27;t match developers&#x27; expectations.<p>Traditionally in Linux there is no concept of &quot;system&quot; and &quot;applications&quot;. There is only one large &quot;system&quot; and you can add parts to it. In old times, you downloaded C source code, make&#x27;d and installed it. Now you use a package manager to extend your system with new features, like playing music or editing images.<p>There are no &quot;applications&quot;. If you download Firefox package from Debian repository, it is not the Firefox application; it is a version of Firefox, tuned, patched and customized for integrating into Debian. You probably won&#x27;t be able to run it even in Ubuntu, let alone other distributions.<p>Paths are often hardcoded; you cannot install a program into your home directory or an USB drive (apt-get might let you do that but it won&#x27;t fix the embedded file paths for you).<p>It might be good enough for a user (as we see with Google Play Store on Android), but it is very inconvenient for a developer. You often need to have several versions of a program, for example, PHP interpreter or Go compiler; no way a package manager lets you do that, compile them yourself. You might want to use an application with project-specific config rather than the one in &#x2F;etc and start it on demand rather than install as a system daemon. That is not easy too. Apt-get and dpkg has literally hundreds of configuration knobs in the manual but you cannot choose installation directory.<p>If you want to run an old application, like Firefox 2.0, get prepared for troubles. While newer versions of libraries like gtk are supposed to be backwards compatible, it won&#x27;t run with them (I tried). You will have to obtain and build old versions of gtk manually; good luck with that. On the good side, I can add that Debian maintains an archive of old packages and you need only to write a custom package manager to install them along with their dependencies.<p>Often official repositories have outdated versions of software; you have to add third-party repositories while giving them full root access to your machine. Want to install Sublime Text in Debian? You have to trust its authors because they can replace your sshd and you won&#x27;t even notice. Also, third-party repos sometimes break or conflict with system ones.<p>Package managers are a pain for developers too. They have to maintain packages for all popular distributions, and even for different versions of those distribution. Because there is no &quot;apps&quot;, you have to integrate your program into every distibution manually. Of course, you will have to do it again and again when anything changes in the distro. Distro maintainers often have to do the same thing, maintaining private patches. And on top of that, different distributions use different package format.<p>Maybe one of the reasons for this is a lack of a standard package manager and build system for C programs. You cannot download from Github and build a C program with dependencies with a single command. It is disappointing if you got used to languages like PHP where it has been possible for a long time.<p>Docker seems to solve many of these problems (and some other, like hardcoded server port numbers) by using a lightweigt virtual machine with full-blown distribution in it. Of course it looks more like a quick hack rather than reliable and well-thought solution. Also, Docker requires many resources: space on disk to store multiple images, memory and CPU time to run unnsesessary daemons inside virtual machines. I don&#x27;t like it.<p>By the way Linux kernel has similar problem with drivers that are a part of a kernel rather than separate entities.