News for hackers. Stuff that matters.
Re:Containers vs. Zones vs. Jails vs. VMs by dreamcompiler on Wednesday March 29, 2017 @12:46AM (#13983475)
These comments are helpful. Thanks. Sounds like for a given piece of hardware you might be able to fit 2 or 3 VMs on it, or a lot more containers. But without the security barriers of VMs.

That being the case, why not just use the OS? And processes and shared libraries?

Re:Containers vs. Zones vs. Jails vs. VMs by mrbrowning on Wednesday March 29, 2017 @01:18AM (#13983628)
The article touches on the technical details of this briefly, but the underlying point here is that containers effectively do use the OS, and processes. Like Frazelle says in the article: "a 'container' is just a term people use to describe a combination of Linux namespaces and cgroups." If that's nonsense to you, check out some of her talks, they treat those topics in a friendly way. At the most basic level, though, a container is just a process (or process tree) running in an isolated context.

Sharing library code between processes running in containers is more complicated, since it depends on whether and how you've set up filesystem isolation for those processes, but it's possible to do.

Re:Containers vs. Zones vs. Jails vs. VMs by ianburrell on Wednesday March 29, 2017 @01:11AM (#13983599)
The isolation means that don't have to worry about containers interfering with each other. It is more about separating and hiding processes rather than protecting from hostile attacks.

The other big advantage is containers provide a way to distribute and run applications with all their dependencies except for the kernel. This means not having to worry about incompatible libraries or installing the right software on each machine.

Re:Containers vs. Zones vs. Jails vs. VMs by toast0 on Wednesday March 29, 2017 @01:20AM (#13983638)
It can be easier to run a jail (or container) and assign it an IP and run standard applications with standard configs than to run a second instance of something in a weird directory listening in a special way.

The other big difference between this and a VM is that timekeeping just works.

You're not necessarily restricted to friendly-only tenants, either. Depending on how you configure it, there can be pretty good isolation between the inside and the outside and the other insides. You lose a layer of isolation, but it's not impossible to escape a virtual machine either.

Re:Containers vs. Zones vs. Jails vs. VMs by mwpmaybe on Wednesday March 29, 2017 @01:13AM (#13983607)
> That being the case, why not just use the OS? And processes and shared libraries?

That's essentially what a Linux container is: a process (that can fork) with its own shlib. If you have lots of processes that don't need to be isolated from each other and can share the same shlib, then no, you don't need this mechanism.

Re:Containers vs. Zones vs. Jails vs. VMs by dreamcompiler on Wednesday March 29, 2017 @01:22AM (#13983654)
Okay, so it's a nice self-contained packaging mechanism that obviates dependency hell. Sounds a bit like a giant lexical closure that wraps a whole process. And from which escape is somewhat difficult. Makes sense.
Re:Containers vs. Zones vs. Jails vs. VMs by candiodari on Wednesday March 29, 2017 @02:55AM (#13984004)
> the same shlib, then no, you don't need this mechanism

And if you want to use a modern development tool chain you don't really have this choice. They produce statically linked binaries that need, at minimum, their own process and TCP port (if you run a proxy which when you think about it is pretty wasteful).

There is no good reason (other than ease of tool chain development) for that, and it's probably cost hundreds of millions or even billions of dollars in servers and power, but there you go.

PHP and Java are essentially the only languages with good support for running without containers, and Java isn't even used that way usually.

Re:Containers vs. Zones vs. Jails vs. VMs by raesene9 on Wednesday March 29, 2017 @01:43AM (#13983745)
I think it's important to make the distinction that containers do provide a level of security isolation, but that in most cases it's not as much protection as it provided by VM isolation.

There are companies doing multi-tenant Container setups, with untrusted customers, so it's not an unknown concept for sure.

what I'd say is that the attack surface is much larger than a VM hypervisor , so there's likely more risk of a container breakout than a VM one.

Re:Containers vs. Zones vs. Jails vs. VMs by dreamcompiler on Wednesday March 29, 2017 @12:16PM (#13987707)
> There are companies doing multi-tenant Container setups, with untrusted customers, so it's not an unknown concept for sure.

I'm a little shocked to hear this (given everything everybody else has said about container security), but I guess it means the security of containers can be tweaked to be good enough in this environment.

Examples?

Re:Containers vs. Zones vs. Jails vs. VMs by gjjrfcbugxbhf on Wednesday March 29, 2017 @01:40PM (#13988717)
How do you make a docker container secure? Run it in a bsd jail :p. But I'm sure that people with the right expertise can do this. For the rest of us Docker is mainly a packaging mechanism which helps alleviate accidents and makes deployment a little more predictable.