News for hackers. Stuff that matters.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by oneplane on Saturday April 29, 2017 @02:09PM (#14227818)
This is starting to smell like a system on top of a system to fix something that could be fixed in the system. Kind-of like implementing a filesystem on top op a filesystem... or putting a database on a filesystem to run another filesystem inside the database, or using a webbrowser as a runtime instead of an operating system.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by zerocrates on Saturday April 29, 2017 @02:28PM (#14227939)
This kind of thing happens when the base system is ubiquitous and therefore hard to change. It's easier to layer something on top of the base, where people can "opt in" and there's a large preexisting compatible audience.

Changing the base layer itself at a minimum requires people to upgrade, and now you don't have that advantage of the preexisting audience anymore. If your improvement requires a breaking change, then you're in a real pickle. So people will stack on more and more until it becomes more or less unbearable.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by user5994461 on Saturday April 29, 2017 @03:22PM (#14228237)
There is an advantage in layering components, or building new software on top of existing components.

However, a minor improvement or bugfix should be done in the component that is responsible for it. Creating another layer instead of fixing the problem is just creating more problems.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by numbsafari on Saturday April 29, 2017 @05:04PM (#14228735)
You can go whole hog with "containers" by just adopting unikernels.

But, unless you are willing to abandon Linux/Unix, this is kinda where you are left.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by hueving on Sunday April 30, 2017 @04:25AM (#14230655)
How would that work when containers make kernel calls?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by sp332 on Sunday April 30, 2017 @07:24AM (#14231039)
Where containers would make kernel calls, unikernels make calls to the VM hypervisor. (Not exactly, but kinda.)
Re:Tiny Linux distro that runs the entire OS as Docker conta... by duncan_bayne on Saturday April 29, 2017 @06:13PM (#14229061)
Which is why highly flexible, powerful base systems are usually preferable to less flexible base systems optimised towards specific goals.

Common Lisp is my go to example of this. It's possible to extend the language to support entirely new paradigms without breaking it, because of the power of the macro system.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by slackingoff2017 on Sunday April 30, 2017 @06:43AM (#14230945)
The reason a new layer is being built is because people don't want vendor lock in and VM's aren't portable anymore.

You can't take an AWS VM and fire it up on DigitalOcean without trial by fire. VM's should be portable but they're not because cloud providers don't want them to be.

For a while everyone was locked into AWS but now that there's other options some companies want to hedge their bets, or even run parts of their workload locally.

Since the VM space is all proprietary now people are moving one level up and building a consistent environment above it. I fully expect docker to become proprietary in a couple years and the cycle will begin again.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by rsync on Sunday April 30, 2017 @10:18AM (#14231604)
"You can't take an AWS VM and fire it up on DigitalOcean without trial by fire. VM's should be portable but they're not because cloud providers don't want them to be."

You can't ?

I have never used DO, but I have deployed linux and FreeBSD systems on EC2 and moving them to bare metal was just a tar command away ... you can even pipeline 'dd' over ssh if you want to be fancy ...

Re:Tiny Linux distro that runs the entire OS as Docker conta... by fapjacks on Saturday May 06, 2017 @09:10PM (#14283279)
You could say that it's as easy as using 'rsync'...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by omgam on Saturday April 29, 2017 @07:09PM (#14229275)
A useful analogy for understanding meatspace ecosystems. Software is a bit like pond scum.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by lostmsu on Saturday April 29, 2017 @02:40PM (#14228015)
The whole notion of containers is basically this. That's why I am not sure why not just fix the OS. If there's anything to fix in the first place.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by gumby on Saturday April 29, 2017 @03:03PM (#14228150)
I always felt, perhaps uncharitably, that the point of containers was "those other programmers are idiots so we need to encapsulate everything for the sake of defense"
Re:Tiny Linux distro that runs the entire OS as Docker conta... by lobster_johnson on Saturday April 29, 2017 @07:32PM (#14229381)
One huge benefit of containers is that you can treat a program as something atomic: Delete the container and it's gone, as if it were never installed.

Modern package management systems like APT spend a lot of effort installing and removing files, and they don't do it completely; any file created by a program after it is installed will not be tracked.

You could accomplish the same thing in other ways (as Apple's sandboxing tech does), of course.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by bubo_bubo on Saturday April 29, 2017 @09:07PM (#14229661)
"Modern package management systems like APT spend a lot of effort installing and removing files, and they don't do it completely"

Well, there /is/ another way to do it.

STATIC LINK ALL THE THINGS

Which would work if licenses and copyrights didn't exist.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by unscaled on Saturday April 29, 2017 @11:50PM (#14230076)
That's one of the main touted benefits of containers (a.k.a build reproducibility). You can view containers as a an overly complicated way to make software with complicated deployment brain-dead easy to deploy.

We're at the point in the hype cycle where it starts getting fashionable to dismiss that as an overkill, but the reality for most of us out there is that most software is way more complicated than a single executable and containers make it easier to deploy complicated software.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by lobster_johnson on Saturday April 29, 2017 @09:27PM (#14229718)
I'm talking about mutations to the file system. Things like database files, logs, /var/run, etc.

Managing internal dependencies (like libraries) is another concern entirely. But containers are good for that, too.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by chainsaw10 on Saturday April 29, 2017 @09:30PM (#14229733)
> Which would work if licenses and copyrights didn't exist.

I don't think it would.

Dynamic linking allows a library to be patched once and have the patch apply to all the programs using it. If every program was statically linked, you would have to update each one individually.

Not to mention the waste of space.

I'm guessing much of that is moot these days, but IMHO it's still something to aim for.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by isostatic on Sunday April 30, 2017 @07:17AM (#14231016)
Patch a library and perhaps you end up breaking some programs that rely on that library.

The benefit of that goes away with containers anyway, you don't share libraries, every instance gets its own install.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Sunday April 30, 2017 @08:07AM (#14231170)
Could have sworn that _nix already had mechanisms for loading different lib versions side by side...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Saturday April 29, 2017 @09:42PM (#14229758)
I think GP is being snarky/sarcastic.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by michaelmrose on Saturday April 29, 2017 @08:49PM (#14229619)
Programs either shouldnt create such files or the if the user created them they shouldn't be removed.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by lobster_johnson on Saturday April 29, 2017 @08:57PM (#14229631)
Are you saying programs cannot create files? That's nonsensical. /var exists for this purpose.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by mschuster91 on Saturday April 29, 2017 @03:55PM (#14228401)
tbh, I see the security point in Docker as a huge risk. Basically you're depending on everyone in the chain to regularly recompile your images or you will get compromised eventually. There is no such thing as an apt-get dist-upgrade or any way to create real useful audit logs with Docker.

On the other hand, deploying stuff is dead easy now. You just tell the hoster "deploy this Docker package, expose port X as HTTP, and put a SSL offloader in the front" and that was it, no more "we need <insert long list> to deploy this" or countless hours spent with the hoster on how to get weird-framework-x to behave correctly.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by voltagex_ on Saturday April 29, 2017 @09:14PM (#14229683)
This is a good reason to build your own rootfs for containers and have as little as possible in them.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by gunnihinn on Saturday April 29, 2017 @06:14PM (#14229062)
I work in a big company. It's much easier for us to spin up a container to run whatever experimental program we've thought might be useful to help us do our job than to provision a real box for it to run on or fit it into the whole bureaucracy.

If it's actually useful we'll find someplace for it to live (or just in containers if that's all that's needed). If not, finding that out was cheap.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by gumby on Saturday April 29, 2017 @07:22PM (#14229347)
This is a more charitable interpretation of what I meant: "we can quickly test the value of an idea via a prototype without the cost of making it super well behaved in other areas." Which is an excellent application of containers!

I just sometimes wonder if the cart hasn't gotten in front of the horse on the whole container front. The fact that the term "bare iron" has been hijacked to mean "not under virtualization" made me start to think that something is seriously fucked up.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Saturday April 29, 2017 @09:27PM (#14229716)
It very much has. Mix it in with devops and agile, and before you know it everyone is throwing hot code directly to "prod"...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by concede_pluto on Saturday April 29, 2017 @06:41PM (#14229172)
If you have machines with unused capacity, why would deploying a docker container image be easier than deploying a RPM package?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by wmf on Saturday April 29, 2017 @07:21PM (#14229345)
Because either there is no RPM or the RPM conflicts with other RPMs on the machine.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by darkr on Sunday April 30, 2017 @07:32AM (#14231063)
There is software collections for RPMs, which is basically namespacing. Can have quite an operational overhead if the thing you want to install has a lot of dependencies though.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @07:37PM (#14229409)
Sounds like then you should learn what a chroot is. All the existing linux platforms already provide the solution to your exact problem with much less overhead than docker.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by chubot on Saturday April 29, 2017 @11:46PM (#14230068)
I agree this is possible, but the tools are somewhat obscure and slow. You can debootstrap in a chroot and then install packages, but it takes a long time, and likely re-downloads hundreds of megabytes packages you already have on the system.

I don't like Docker, but I think it does some differential compression with the layers when you are modifying the image. So you don't have to re-do this install from scratch.

You may also run into issues with user IDs and various system config files in the chroot. Configuring the service with flags, env vars, and config files is a bit of a pain.

Docker is essentially a glorified chroot... I've essentially tried to rebuild it, and it is unfortunately a lot of work.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by coldtea on Saturday April 29, 2017 @10:27PM (#14229885)
Only that chroot wont also run on the development machine, running a totally different OS.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by concede_pluto on Sunday April 30, 2017 @02:39PM (#14233137)
This is a self-inflicted problem. 787 engineers don't have to test their work on a Learjet.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dozzie on Saturday April 29, 2017 @06:41PM (#14229169)
You do realize that the scenario you have described could be carried out with chroot just as easily, right? The only way "containers" help (and not containers as is, but Docker specifically) is that they ship the whole chroot OS image with all the dependencies.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by hamburglar on Saturday April 29, 2017 @07:35PM (#14229399)
I think the "just as easily" is highly debatable. I'm not a container evangelist by any stretch, but if you were going to take a "just chroot it" approach, the very first thing you'd want to do to ease the operational burden is define some kind of standard app packaging format that defines what's in the chroot and an entry point and an environment, and maybe some scheme for mapping external data and various other niceties you get with containers, and at that point, congratulations, you've reinvented containers.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dozzie on Saturday April 29, 2017 @08:05PM (#14229487)
> I think the "just as easily" is highly debatable.

Heads up, you're talking about a different thing. You want to run these things as normal operations, but gunnihinn was talking about deploying an application to check if it is of any value. Chroot is just enough to make a mess as the application's developer instructed in INSTALL.txt without the need to worry about cleaning up afterwards.

And by the way, you seem to be confusing containers and Docker.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by hamburglar on Saturday April 29, 2017 @09:31PM (#14229736)
I disagree. Just google "doesn't work in chroot" and you'll be reminded of a litany of issues that come up when trying to build/run things in a chroot, and a container containing a linux distro makes a tidy little sandbox which generally avoids those issues. It's somewhere on a spectrum between a chroot and a VM, which I think a lot of people find value in.

And I'm not confusing containers and Docker, I'm just speaking a bit imprecisely. In my experience, conversations about "containers" are rarely about raw containers, but rather some specific containerization scheme and tools (e.g. docker). I suspect everyone in this entire subthread means "docker containers" when they says "containers."

Re:Tiny Linux distro that runs the entire OS as Docker conta... by dozzie on Sunday April 30, 2017 @07:33AM (#14231070)
> Just google "doesn't work in chroot" and you'll be reminded of a litany of issues that come up when trying to build/run things in a chroot

Yeah, some newbie forgot to mount-bind a necessary directory like /proc or /dev, didn't provide sensible /etc/resolv.conf, or messed up host's and chroot's paths, either in request or in configuration. Nothing that would render chroot unviable. Is this what you meant?

Re:Tiny Linux distro that runs the entire OS as Docker conta... by jstarks on Sunday April 30, 2017 @05:49PM (#14234035)
Why would anyone want to get all that right manually when containers manage all that automatically?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dozzie on Monday May 01, 2017 @07:40AM (#14236846)
Good question. Why anyone presented with fancy and fashionable third party software would use a mechanism that has been present for decades, ships with the operating system, works reliably and predictably, doesn't change substantially every quarter, doesn't do any magical things to network configuration, and is easy to inspect, debug, and adjust for an outsider? Why indeed?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @07:17PM (#14229325)
So you have an organizational problem and you're hacking one problem with another hack. Clearly nothing can go wrong with this approach.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by gumby on Saturday April 29, 2017 @07:22PM (#14229348)
I don't see that as an organizational problem, but a way to try something out safely and faster.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @07:26PM (#14229358)
I was referring to how they are unable to provision the right resources to run experiments because of all the red tape and they are getting around the issue by using docker. What happens when the red tape guard get wind of this?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by ChuckMcM on Saturday April 29, 2017 @04:21PM (#14228539)
I don't think so. Consider that computers are generally so powerful these days that when running a single application stack their seriously under utilized. The first way people went about getting this going was Virtual Machines (made popular by IBM with its VM/370 OS :-) and that works well but when all of your clients are running the exact same OS down to the same version, it is kind of waste to have 'n' copies of the OS loaded, so containers are a 'semantic' fractioning of the resources where the OS is common but the set of processes are unique to a client. You still need a way to allocate from the single set of resources so containers provide that abstraction.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @04:27PM (#14228569)
What exactly is the problem with process sandboxing and language level VMs? The industry is tackling all the wrong problems. So have we given up on process sandboxing with capabilities? The whole containerization movement is one giant hammer to kill a fly kinda business these days. While you guys are figuring all this out I'm gonna stick with BEAM, JVM, and other tried and true methods. I'll check back in another 5 years to see what this mess has turned into. Maybe that's enough time to figure out how all the overlay networking is working out because, you know, we need a few more overlays between the hardware and the VM.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by derefr on Saturday April 29, 2017 @06:48PM (#14229191)
Because then each piece of software you develop is limited to a single process written in a single language. How do you use "process sandboxing with capabilities" to isolate, say, an Erlang process that uses a NIF embedding a shared-memory section to interact with a companion OpenCL C process? With containers (or VMs), the answer is obvious; with POSIX-level isolation primitives, not so much.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @06:54PM (#14229218)
http://man7.org/linux/man-pages/man7/capabilities.7.html

There are several capabilities in that list to address your problem. Since your question is concerned about memory you can search for "memory" in that page and note the exact capabilities you will need.

OpenBSD has even more features (https://en.wikipedia.org/wiki/OpenBSD_security_features) alongside the capability model.

My gripe is that instead of learning how to properly use their tools and platforms people have started looking for golden hammers like docker and now we have a mess like RancherOS. If someone can explain to me how isolating the system services in docker containers (which by the way are not isolated since they are privileged) does anything above and beyond what capabilities and the security features in OpenBSD provide then I'll concede the point. My guess is there are no advantages and people are jumping on bandwagons they know nothing about and since the previous generation of tools was not utilized to its full extent neither will all the new docker hotness. People are hammering square pegs into round holes.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by derefr on Saturday April 29, 2017 @08:06PM (#14229491)
Note that my point wasn't about how "your process" can be non-isolated in certain ways using capabilities, such that you could, in theory, sandbox both of those processes individually and have them still do whatever IPC you want; yes, this is certainly possible, and obviously more sensible if one of those processes isn't so much "your" process as it is some other process managed by some other party that you're interacting with.

My point was more about the "developer UX" of needing to isolate things that way. Containers have the semantics of isolating a group of processes, but not performing any internal isolation between the processes in the container. This is almost always what you want—you want "your app" to be able to have multiple processes, and to not have any security boundary between the parts of "your app", just between "your app" and "other apps" or the OS. In other words, you want to have a single "process"—from the OS security subsystem's perspective—whose threads happens to be composed of multiple PIDs, multiple binaries, and multiple virtual-memory mappings. You want to fork(2) + exec(2) without creating a new security context in the process.

Sandboxing would make perfect sense if single processes were always the granularity that "apps" existed at. Sometimes they are. Sometimes they're not, and people do complex things with IPC-capability-objects. And sometimes, when they're not, that fact pushes people toward avoiding multi-process architectures in favor of monolithic apps that reimplement functionality that already exists in some other program in themselves, in order to bring that functionality into their platform/runtime so it can live in their process.

Containers let people avoid this decision, by just applying things like capabilities at the container level, rather than at the process level.

> If someone can explain to me how isolating the system services in docker containers (which by the way are not isolated since they are privileged) does anything above and beyond what capabilities and the security features in OpenBSD provide then I'll concede the point.

Completely apart from the above, my understanding of Rancher is that it's the Docker part of "Docker container", not the container part, that provides the benefit there. Docker is a packaging and service-management system; that its packages use containers is frequently beside the point. Rancher's system services are Docker images (i.e. Docker "packages"), and so you use Docker tooling to create, distribute, manage and upgrade them. If your own application on such a system is managed through Docker, this provides a neat solution to unifying your operations—you just do everything through the docker(1) command.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Saturday April 29, 2017 @10:01PM (#14229794)
Ugh, "apps". If ever there is a tortured term in computing these days it's that one.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by derefr on Saturday April 29, 2017 @11:37PM (#14230053)
Okay, how about "a purchased software product launched through a GUI"? There's no guarantee that it's a single process, but there's an assumption that it's a single security context.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by ChuckMcM on Sunday April 30, 2017 @02:06PM (#14232937)
Well at Google where a lot of development on containers took place the problems with process sandboxing and language level VMs were machine resource allocation, both in memory and in I/O bandwidth. Lets say you have three "systems" on the box, one is a collection of processes providing elements of a file system, one is a collection of processes providing computation, and one is a collection of processes providing chat services. Now you want to allocate half of the disk i/o to the file services, and a half to the compute system, then 75 percent of the network bandwidth to the chat system, 20 percent to the file system, and the remaining plus any "unused" to the compute system. You want half of the memory in the system to go to the compute system and give the rest to the network file system processes.

That is a complex mix of services running on a machine, some sharing the same flavor of VM, and you're allocating fractions of the total available resource capability to different components. If you cannot make hard allocations that are enforced by the kernel you cannot accurately reason about how the system will perform under load, and if one of your missions is to get your total system utilization to be quite high, you have to run things at the edge.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by justincormack on Sunday April 30, 2017 @05:18AM (#14230760)
Because process sandboxing turned out to be insufficient, and we need layered sandboxing with several levels for protection for security.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by rsync on Sunday April 30, 2017 @11:02AM (#14231851)
"it is kind of waste to have 'n' copies of the OS loaded, so containers are a 'semantic' fractioning of the resources where the OS is common but the set of processes are unique to a client. You still need a way to allocate from the single set of resources so containers provide that abstraction."

Agreed. What I find so odd is that this problem was simply and elegantly solved in BSD with 'jail' and everyone went about their business.

I do not understand why (what appears to be) the linux answer to 'jail' is so complicated and fraught and the subject of so much discussion.

I am not sure that containers and their build scripts represent the $huge_profit_potential that people think they do ...

Re:Tiny Linux distro that runs the entire OS as Docker conta... by thearn4 on Sunday April 30, 2017 @07:08AM (#14230998)
Do you feel the same way about visibility in OOP? E.g. private data and methods?
Re:Tiny Linux distro that runs the entire OS as Docker conta... by SomeStupidPoint on Saturday April 29, 2017 @02:54PM (#14228110)
Containers are just unifying the concepts of namespaces and cgroups in to environments -- I'm not sure that there's a better way to do that at the OS level, as I enjoy the primitives being separate and having the potential to remix them as my understanding of containerization evolves. (Okay, so there's a few other things mixed in like SELinux settings.)

I think there's interesting ideas of environments in other operating systems, but I'm not seeing how you'd make things better by flattening containers into the OS, per se.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by derefr on Saturday April 29, 2017 @06:50PM (#14229200)
One obvious tweak would be to make it so that every bit of isolation that containers now get by default, you instead get per POSIX process-group/session or somesuch, so you don't have to think in terms of containers to get the benefit of containers—they're just something the OS does transparently whenever you make it clear that a set of processes forms a distinct, separate cluster.

Making existing programs compatible with such a paradigm probably wouldn't be any more work than e.g. adding SELinux/AppArmor support.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Saturday April 29, 2017 @09:29PM (#14229731)
Nah, that would be too easy. Let's instead introduce yet another notion of sessions (logind).
Re:Tiny Linux distro that runs the entire OS as Docker conta... by rwmj on Sunday April 30, 2017 @04:59AM (#14230721)
(I'm not saying this is a good thing but ...) Containers are often used where you want to run several programs, but each depends on a mutually incompatible set of libraries. Two programs need python-somelib-1.0 and python-somelib-2.5, but both versions can't be installed at the same time. Or you need to upgrade the programs at different times and during the upgrade window they'd depend on different versions of python-somelib.

Now of course the correct way to solve this would be (a) to make both programs use the same version of python-somelib, (b) make upgrades happen atomically, (c) for Python modules to actually have some API backwards compatibility. But in the absence of doing the right thing you can use a container to effectively static-link everything instead. And worry about the security/bloat/management another time.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by JdeBP on Sunday April 30, 2017 @05:22AM (#14230770)
You forgot possibility (d) allow multiple library versions to be present simultaneously.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by btschaegg on Sunday April 30, 2017 @06:34AM (#14230923)
See: Virtualenv (for Python), Snappy, Flatpack

The main advantage of docker, as far as my understanding goes, is more of a prebuilt system configuration thing. Need a database? Load the prebuilt PostgreSQL image onto the respective machine.

One thing I think should get more use in general is that Dockerfiles are essentially completely reproducible scripts[1]. Too many companies I've seen still use Word documents full of manual steps one can easily get wrong for all their machine setups (especially in the Windows world). If you want to test something quickly, you're bogged down for a day.

[1]: example: https://github.com/kstaken/dockerfile-examples/blob/master/m...

Re:Tiny Linux distro that runs the entire OS as Docker conta... by isostatic on Sunday April 30, 2017 @06:43AM (#14230946)
Over the last 15 years I've built and maintained Linux distros using apt, with custom debs and pressed files which handle configuration, automatic upgrades for most systems, and a small shell script and ssh for the rest.

Now it's all docker rather than packages, ansible (which leaves no trace of what it's doing on the target machine) rather than a for I in 'cat hosts'. Fine, but where's the benefit?

Re:Tiny Linux distro that runs the entire OS as Docker conta... by btschaegg on Sunday April 30, 2017 @08:15AM (#14231194)
Note that I didn't make any value statement towards Docker - I don't have that much experience with it and found their infrastructure to be rather clunky, when I tried it. So, I'm not sure I'm qualified enough to make definitive statements about its usefulness.

I can see, however, a benefit in encapsulating different services in different containers, as this potentially gives you some control over them (available disk space, network usage etc.) * . On top of that, I imagine starting out on a "machine agnostic" approach can be rather useful if you have to change your network landscape further down the line: If your database already is configured as if it were running on its own server, there's certainly a bunch of unintended coupling effects you can avoid.

That said, I can't see Docker being the silver bullet it gets hyped up to be sometimes. But that goes for most new and shiny things in the tech space...

* And yes, that's already feasible without containers. Docker's approach to this seems to provide a way to do it in a much more automated way than most alternatives though.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by JdeBP on Sunday April 30, 2017 @08:04AM (#14231162)
Re:Tiny Linux distro that runs the entire OS as Docker conta... by curun1r on Sunday April 30, 2017 @03:15PM (#14233311)
> The main advantage of docker, as far as my understanding goes, is more of a prebuilt system configuration thing

I think the main advantage is that it standardizes the interface around the application image/container. This allows powerful abstractions to be written once rather than requiring a bespoke implementation for each way that the application is structured. Imagine writing the equivalent of Kubernetes around some hacked-together allows-multiple-versions-of-a-dependency solution. It would be a nightmare. But because the Docker image/container interfaces are codified, you can build powerful logic around those boundaries without needing to understand what's inside those images/containers. Dynamically shifting load, recovering from failures, automatic deployments and scaling are all much easier when you don't have to worry about what language the application is written in or how the application is structured.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by quigonjinn on Sunday April 30, 2017 @09:07AM (#14231340)
There is a way to do this without the security/bloat/management issues. Take a look at the approach of GNU Guix. Both versions of a package can coexist in the system. Libraries are dynamically-linked and security updates can be applied fast (without building the world), using the "grafting" system.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by argon81 on Saturday April 29, 2017 @08:23PM (#14229551)
Actually, Lennart proposed some years ago exactly how you could "fix" the OS to apply the ideas from containerisation. http://0pointer.net/blog/revisiting-how-we-put-together-linu...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by michaelmrose on Saturday April 29, 2017 @08:48PM (#14229615)
This seems horribly complicated and ridiculous especially since when it was written btrfs which was a requirement was pretty terrible.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by gbraad on Saturday April 29, 2017 @09:31PM (#14229737)
At the time of writing, btrfs was seen as the hero to be. Things have changed quite a lot. Currently we are solving this problem with a combination of containers and an immutable filesystem (ostree). Anyways, solutions discussed in the open are always a good idea... How ridiculous they may be perceived. Lennart, a Club Mate to you...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by digi_owl on Saturday April 29, 2017 @09:23PM (#14229702)
Well the author is Lennart Poettering, the guy that "gave" the Linux world Pulseaudio, Avahi and Systemd...
Re:Tiny Linux distro that runs the entire OS as Docker conta... by developer2 on Saturday April 29, 2017 @06:39PM (#14229162)
It's nothing like that at all. It's just a minimal operating system with a small install image. The only special thing it does is replace the init process with a system-docker process to reduce the overhead of resources used by the operating system.

The point isn't really to "run more Docker". It's to eliminate as much operating system overhead as possible, so that nearly every CPU cycle and byte of memory usage is dedicated to your containers.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @07:21PM (#14229342)
You realize how you're not making any sense. Docker is another abstraction so it can not be better in terms of resource usage than running whatever process you are now running inside docker. You literally have more overhead with the docker approach in terms of all resource utilization. You now have all the overhead of an OS and then you are layering docker on top of it. The OS has not gone away. It is still managing processes, memory, files, sockets, networking, etc.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by elcritch on Saturday April 29, 2017 @09:00PM (#14229642)
Rather it's replacing systems like systemd and various other system daemons with the docker equivalents.

For example why run a network supervision daemon if dockerd or equivalent handle all the important complex pieces of networking via container orchestration? Why have a local package manager, or system port mapper.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @09:21PM (#14229696)
I'm pretty horrified by the argument you're making. The reason all those things are separate things is because they serve orthogonal functions. By bundling all of that into a single binary how have you improved things? You've increased the attack surface, reduced stability, increased complexity, and made things a lot harder to test and verify.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by elcritch on Sunday April 30, 2017 @04:54PM (#14233775)
Well can't speak to the horror of the design as I'm not a really proponent of that particular design. Just clarifying the parent's statement a little. Though the rancheros design is not particularly worse than what systemd does now, based on my recent experiences. It's all one giant (poorly?) implemented binary either way. From a pragmatic standpoint I don't see a difference. What's the difference between one opaque binary vs another, except possibly one's written in Go which I find easier to read if needed and is less likely to have buffer overruns. Really cutting out one crapshoot seems logical as at least there's only one system you'd need to learn. Still I'd like a non-either of those options approach.

Personally I prefer running SmartOS and Triton containers. Their system seem much more stable than any of the Linux containers and/or systemd setups I've tried. It sticks a bit more to traditional unix design which makes sense to me. Items like the caching layer for containers build on ZFS snapshots, a well tested file system layer, rather than ad hoc userland tools. Triton also runs all of the orchestration layers in separate zones (containers) like RancherOS is trying to build. But each component is a simple(ish) service, it's easy to `zfs list` and check on a container's file system or fix it or backup, etc. Same with SVC or VM machine management which both have small simple tools that do one thing pretty well.

To that note, docker has been moving towards breaking out and using smaller daemons haven't they? If that continues it might turn out more modular in the end wherein RancherOS would end up being more modular than systemd Linux setups. Imho, that'd be great.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by developer2 on Saturday April 29, 2017 @10:58PM (#14229962)
Have you ever used Rancher OS? Not trying to sound like a judgemental jerk, but the arguments you are making are clearly from someone who is commenting based on a preconceived notion of what it is, without knowing what it really is. Instead of combating others in comments because they can't succinctly describe it to you, go research it instead. If you don't care enough to look into it, you shouldn't be caring to argue in the comments.
Re:Tiny Linux distro that runs the entire OS as Docker conta... by dkarapetyan on Saturday April 29, 2017 @11:19PM (#14230008)
Not to sound like a judgmental and experienced jerk back but how many container orchestration systems have you built and run in production? Since I have first hand experience in building, hacking, and working around all the limitation of a few such systems deployed into production environments I think I know all there is to know about RancherOS.

By all means continue to run RancherOS and let me know how that goes when you're managing a few hundred to maybe upwards of a thousand VMs and then layering a container orchestration system with the underlying VMs coming and going on an on-demand basis. I remember thinking "I really wish I had more of this docker stuff in the OS itself. Because dealing with all the caching, volume mounting, and instability in userspace is so much fun".

I'll await your report because clearly my experience with these systems and all the ways they fail is too combative for your taste. There are a few things they don't tell you on the brochure when you're drinking the kool-aid.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by gerdesj on Saturday April 29, 2017 @05:44PM (#14228937)
It's simply billed as the easiest way to run Docker, well: "The smallest, easiest way to run Docker in production at scale."

I might give it a crack based on that. If you are hell bent on running Docker then an equivalent of the Ubuntu minimal install seems a good way to start.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by skrebbel on Sunday April 30, 2017 @08:26AM (#14231223)
Your comment made me more interested in this solution than I was at first glance. I tend to prefer pragmatism over elegance, which is why I like using a webbrowser as a runtime, for instance. It'll work everywhere.

If this idea has similar pragmatic advantages over the would-be best solution, then I'm game.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by czeidler on Sunday April 30, 2017 @04:05PM (#14233541)
Have a look at http://genode.org/
Re:Tiny Linux distro that runs the entire OS as Docker conta... by trhway on Saturday April 29, 2017 @03:42PM (#14228320)
>Kind-of like implementing a filesystem on top op a filesystem

yep, when you want a distributed filesystem building it on top of a good and already working local filesystem is a pretty robust and cheap approach.

>smell like a system on top of a system to fix something that could be fixed in the system.

container layer is basically a distributed OS. Making a distributed OS by "fixing in the system" is pretty much non-starter ... or a huge academia project.

Re:Tiny Linux distro that runs the entire OS as Docker conta... by michaelmrose on Saturday April 29, 2017 @08:55PM (#14229628)
How is docker a distributed OS?