@elan said:
I wouldn’t go so far as to call Docker an emulator.
From my perspective we get to bring all the features of the platform to FreeBSD, without incurring the cost of maintaining a separate build which is missing features, for <1% of our users.
FWIW, I have to support what @elan is saying here, even though it does not align with the perspective of your average FreeBSD devotee and their always strong desire for “native apps”, since the presence of same validate their choice of OS platform and it’s always comforting to see “FreeBSD” on the supported software list for anything. Believe me, I get it.
That said, there will always be a tension between that POV and the ISV perspective, the latter of which is always trying to minimize development and support costs by porting to only those platforms which are absolutely necessary. That was what was so hugely compelling about Java - the notion of “write once, run anywhere” has always been something of a holy grail for ISVs and why Sun had such initial success with that marketing tag. It turned out to be not entirely true, or at least not true without also having to accept some serious caveats, but that doesn’t mean ISVs ever stopped wanting the chalice.
Having to do builds, qualification tests and support for multiple platforms is simply a pain in the butt, and if there were one “universal binary” that could do the job for everyone, you can bet it would be at the top of the wish list for the folks at Plex and every other software house in the world.
Well, along comes Docker. It ties all of the various disparate Linux solutions together with a reasonable ‘ABI’ standard (which goes further than binary format and system call compatibility but also applies to the overall execution, aka userland, environment) and then the folks at Plex hear that FreeNAS 10 is also going to run Docker containers in a fully compatible (boot2docker) virtualization environment and already has their official Plex container up and running, including the plexpass version (which we just added to the official /r/freenas container repo last night). What’s not to like about that? Why wouldn’t they be happy to hear we’re working to maximize their overall bang for buck? You simply have to look at it from their (or, again, any ISV’s perspective). Looking at the sheer number of platforms Plex already supports, it’s clear they already have their hands full.
Finally, I’ll just point out that this constant tension between “emulate vs port” is hardly new. Back when we first started the FreeBSD project (remember, this was the early 90’s), we really really wanted to be able to run at least two really major applications: Flash (which was ubiquitous and binary-only) and the Oracle database, something which a lot of our early enterprise customers absolutely relied on. Our only alternatives were to emulate either the Windows or the Linux versions because Adobe and Oracle, respectively, let it be known that they were NEVER going to port to FreeBSD. Just not in the cards, get over it, install Linux you guys! Well, that didn’t sit well, so a few folks suggested that maybe we could emulate just enough of Linux to run those applications, and what initially started as a crazy idea eventually morphed into the Linux emulation support that you see in FreeBSD today. It was both popular and highly controversial, of course, because “OMG we were killing all incentive to port to FreeBSD!” but it did run Flash and it did run Oracle and a lot of early FreeBSD users could never have been FreeBSD users without that capability. They had applications to run, and if we (in the development team) had been religious rather than pragmatic, they’d have just switched to Linux. Fortunately, due to the Linux emulation, they did not have to.
The problem is, that this is also where things stopped. Once the initial pain points were largely gone, the Linux emulation code stagnated and never did become a fully-fledged Linux compatible solution. There was just too much chasing of the bus necessary, as Linux itself evolved, and it was kind of a thankless task besides. There things largely rested until, finally, FreeBSD gained the ability to simply run all of Linux (any Linux) inside a virtual machine. Hurray! A much easier solution! Why chase compatibility system call by painful system call, and be forced to copy (and keep up to date) large chunks of the Linux userland into FreeBSD when we can simply run the whole thing in a neat little box, using the standard linux tools to keep that little box up to date? Easy button! If anything, virtualization has been around for so long now, FreeBSD finally catching up was nothing less than an expectation at this point.
Docker is no different - we’re just proxying the Docker remote API calls into a suitable Linux VM and bingo, done, any docker container (and there are well over 100,000 of them) can just run with zero compatibility concerns. It is, if you think about it, just another chapter in the “linux emulation” story for FreeBSD, but one writ even larger and with more application compatibility than even possible before, so it’s hard to blame the nice folks at Plex for seeing this as anything but a boon. Why wouldn’t they? Why, for that matter, wouldn’t your average FreeBSD user? They can still run their favorite OS while having full access to alternative operating systems (Linux, Windows, etc) and the applications that run (only) inside them. They don’t have to chase ISVs around with the begging bowl, hoping they’ll tackle yet another port.
I think there’s being on the right side of history and on the wrong side. Looking back in 20 years, we will wonder why we felt so strongly about “native” this and “native” that when other technologies came along and simply rendered the point moot. This may be all a bit hard to swallow now, here on the inflection point of history, but there’s no questioning that this is where things are going. PAX.