News for hackers. Stuff that matters.
Re:Why would anyone choose Docker over fat binaries? by friend-monoid on Sunday October 29, 2017 @08:06AM (#15578998)
* If my colleagues don't have to understand how do deploy applications properly, their work is simplified greatly. If I can just take their work, put it in a container, no matter the language or style, my work is greatly simplified. I don't have to worry about how to handle crashes, infinite loops, or other bad code they write.

* We have a whole lot of HTTP services in a range of languages. Managing them all with fat binaries would be a chore - the author would have to give me a way to set port and listen address, and I have to keep track of every way to set a port. With a net namespace and clever iptables routing, docker can do that for me.

* sometimes, I have to deploy and insecure app. Usually, it's a badly configured memcache or similar. With net namespaces, I can make sure only a certain server has access to that service, and that the service cannot ruin my host server.

* Its possible for me to namespace everything myself with unshare(1) and "ip netns" and cgroups and chroot and iptables... but that would consume all my available time. Docker can do that for me.

* When you reach more then 20 or so services to keep track of, you need tools to help you out.

* load balancing. Luckily, I don't have to deal with extreme network loads which would require hand-made solutions, but just pushing up that number a little to do ad-hoc load balance makes things a lot easier.

Re:Why would anyone choose Docker over fat binaries? by notyourday on Sunday October 29, 2017 @09:51AM (#15579280)
> * If my colleagues don't have to understand how do deploy applications properly, their work is simplified greatly. If I can just take their work, put it in a container, no matter the language or style, my work is greatly simplified. I don't have to worry about how to handle crashes, infinite loops, or other bad code they write.

Of course you do, you just moved the logic into the "orchestration" and "management" layer. You still need to write the code to correctly handle it. Throwing K8S at it is putting lipstick on a pig. It is still a pig.

> * We have a whole lot of HTTP services in a range of languages. Managing them all with fat binaries would be a chore - the author would have to give me a way to set port and listen address, and I have to keep track of every way to set a port. With a net namespace and clever iptables routing, docker can do that for me.

Nope, you wrote a set of rules and as long as everyone adheres to those rules things kind of work ( in a clever way ). Of course if you had the same kind of rules written and followed in any other method, you would arrive at the exactly the same place. In fact, you probably would arrive at a better place because you would stop thinking that your application works because of some clever namespace and iptables thing.

> * sometimes, I have to deploy and insecure app. Usually, it's a badly configured memcache or similar. With net namespaces, I can make sure only a certain server has access to that service, and that the service cannot ruin my host server.

You may be able to guarantee this with a VM but you certainly cannot guarantee it with a container.

> load balancing. Luckily, I don't have to deal with extreme network loads which would require hand-made solutions, but just pushing up that number a little to do ad-hoc load balance makes things a lot easier

The time to build a template and instrumentation for your haproxy/nginx/varnish layer is when you don't have enough traffic and enough complexities.

Re:Why would anyone choose Docker over fat binaries? by anilakar on Sunday October 29, 2017 @10:15AM (#15579387)
I think that the main point was that docker skills are transferable, i.e. you can expect a new hire to be productive in less time. Too many companies still have in-house build/deploy systems that are probably great for their purpose but don't offer valuable experience that would be usable outside that company.
Re:Why would anyone choose Docker over fat binaries? by notyourday on Sunday October 29, 2017 @10:26AM (#15579432)
In my observation, Docker skills is a modern day ability to type "make", without being able to actually write a Makefile or debug a Makefile.
Re:Why would anyone choose Docker over fat binaries? by noahwilde on Sunday October 29, 2017 @01:32PM (#15580291)
Writing a dockerfile successfully is maybe that. But learning to make a dockerfile should take someone a day to figure out. What the entire movement is about is creating an ecosystem around a common standard for dev ops.
Re:Why would anyone choose Docker over fat binaries? by krizzo on Tuesday October 31, 2017 @11:03PM (#15598539)
I use Makefiles for creating docker files there is an advantage to docker from fat binaries. Both tools exist for a reason, used both wisely you can save time and effort.
Re:Why would anyone choose Docker over fat binaries? by sigjuice on Sunday October 29, 2017 @12:46PM (#15580001)
Yes. Each time you start a container, you are basically saying “make clean” as well.
Re:Why would anyone choose Docker over fat binaries? by notyourday on Sunday October 29, 2017 @02:52PM (#15580690)
Except that people who write software to be put in containers cannot write that Makefile to save their life so for something that should be a ten line dependency they manage to build entire Linux, entire X and all unneeded tool chains.
Re:Why would anyone choose Docker over fat binaries? by tokenizerrr on Sunday October 29, 2017 @11:12AM (#15579580)
Your observation is incorrect.
Re:Why would anyone choose Docker over fat binaries? by Silhouette on Sunday October 29, 2017 @10:39AM (#15579468)
If a company has existing in-house systems that are working well, why should they care about "valuable experience that would be usable outside the company"? Unless you think it's their responsibility to train people so those people can then leave and take the benefit of that training to some other, possibly competing, business?
Re:Why would anyone choose Docker over fat binaries? by Johnny555 on Sunday October 29, 2017 @03:23PM (#15580879)
The company may not care about building skills for employees that are transferable elsewhere (though good companies do), but they do care about being able to hire people with skills that are applicable to their systems.

While a very large company can get away with building a custom in-house ecosystem that takes months for a new employee to come up to speed on, most companies find it more palatable to use industry standard products/systems that a new employee is already familiar with and can come up to speed on quickly.

Re:Why would anyone choose Docker over fat binaries? by Silhouette on Sunday October 29, 2017 @04:43PM (#15581314)
The company may not care about building skills for employees that are transferable elsewhere (though good companies do), but they do care about being able to hire people with skills that are applicable to their systems.

Of course, but who would you rather hire, someone with solid fundamentals who can get up to speed quickly with anything, or someone who job-hops to use the latest buzzword library/framework/language that may have a useful lifetime of just a few years or even less? Given an either/or decision with other things being equal, I would almost always prefer to hire the former, and then use whatever tools worked best for the job regardless of whether they were built in-house or imported. A job-hopping resume full of trendy buzzwords is a big red flag for me.

While a very large company can get away with building a custom in-house ecosystem that takes months for a new employee to come up to speed on

This argument gets made all the time in discussions about frameworks, but I just don't see it. In my entire programming career, I have yet to encounter this hypothetical nightmare architecture that takes months before you can become productive and has no useful documentation or examples even though the entire application is built around it. (YMMV, obviously.)

Being able to get up to speed quickly on a new framework or library is an essential skill for a working professional developer. Whether that is the latest shiny Web World buzzword or something internal in your new employer's environment makes little difference, as long as the internal design is also sensible and reasonably documented -- and if it's not, you have much bigger problems than who you're thinking about hiring next.

Re:Why would anyone choose Docker over fat binaries? by noahwilde on Sunday October 29, 2017 @10:51AM (#15579517)
Companies don't have a moral responsibility to do that, but it's a smart retention strategy. If good devs feel like they're learning useless non transferable skills, they'll be more likely to leave for the sake of their career. If they feel like the business is investing in them, they'll be more likely to stay.
Re:Why would anyone choose Docker over fat binaries? by pfranz on Sunday October 29, 2017 @02:06PM (#15580454)
Resume Driven Development can be just as bad for everyone involved.
Re:Why would anyone choose Docker over fat binaries? by dwaltrip on Sunday October 29, 2017 @02:59PM (#15580731)
That's a slanted take. Skills and experience that are only useful inside of one specific company are more likely to be less meaningful and effective (almost by definition).

Many highly competent individuals like to understand the fundamentals and first principles of how systems work and how different problems can be solved, and thus find work that provides no transferable knowledge/experience to be less appealing.

Of course, there is a balance here. Sometimes frustrating tasks must be done. In that case, ideally the end goal is sufficiently motivating.

Re:Why would anyone choose Docker over fat binaries? by Silhouette on Sunday October 29, 2017 @04:49PM (#15581343)
Many highly competent individuals like to understand the fundamentals and first principles of how systems work and how different problems can be solved, and thus find work that provides no transferable knowledge/experience to be less appealing.

Right, but to those people, whether you use Docker or Kubernetes or custom scripting or a unicorn whose horn magically creates new instances when you need them is mostly just an implementation detail. It's no more interesting than exactly which compiler or DB you use; these are just tools, means to an end. If the differences are significant for your use case, sure, you evaluate and choose accordingly, but then you use the tools to get on with the job. The deep, interesting stuff is almost always in what you can build once you're into that territory.

Re:Why would anyone choose Docker over fat binaries? by dwaltrip on Sunday October 29, 2017 @05:46PM (#15581596)
This is definitely true for many people.

However, I do think it's likely there are some fundamental principles at play that make tool 1 better than tool 2 in specific contexts, and I think it is valuable and interesting to explore that.

Perhaps we are getting into the scientist vs. engineer mindset. I would guess, though, that the best engineers undoubtedly have some scientific curiousity helping them excel in their craft.

Re:Why would anyone choose Docker over fat binaries? by pfranz on Monday October 30, 2017 @01:06PM (#15586761)
I think the conflict can be that engineers know what they're interested in, scratching their own itch, but that's not always aligned with what's best for the company. The balance is finding both.

One extreme is that I see companies hold on to toxic employees because they're brilliant, even if they are bad for the company long term.

Re:Why would anyone choose Docker over fat binaries? by pfranz on Monday October 30, 2017 @01:02PM (#15586718)
(it does look like we're saying the same thing) Catering to a developer's whim as a retention strategy is not going to end well for anybody. In an ideal situation it can be mutually beneficial (that's what good management is--but that's not only relevant to your tech stack), in the worst case the developer leaves and there's new hotness from 3 years ago that doesn't work very well and nobody wants to touch.
Re:Why would anyone choose Docker over fat binaries? by snuxoll on Sunday October 29, 2017 @09:53AM (#15579294)
> You may be able to guarantee this with a VM but you certainly cannot guarantee it with a container.

I can guarantee it pretty well on my RHEL and CentOS systems, SELinux prevents containers from accessing things they shouldn’t just like it prevents Apache from dumping /etc/passwd.

Re:Why would anyone choose Docker over fat binaries? by lightedman on Sunday October 29, 2017 @11:39AM (#15579681)
"I can guarantee it pretty well on my RHEL and CentOS systems"

Slashdot tried that with CentOS and failed miserably. I have my doubts regarding your guarantee.

Re:Why would anyone choose Docker over fat binaries? by Spivak on Sunday October 29, 2017 @02:37PM (#15580607)
Link? I want to see what they actually tried.
Re:Why would anyone choose Docker over fat binaries? by 2trill2spill on Sunday October 29, 2017 @12:48PM (#15580014)
> You may be able to guarantee this with a VM but you certainly cannot guarantee it with a container.

Don't group all container implementations into one category. You could certainly use FreeBSD Jails and Illumos Zones for isolating apps.

Re:Why would anyone choose Docker over fat binaries? by pmoriarty on Sunday October 29, 2017 @12:58PM (#15580066)
Those solutions still allow the host and all the other containers to be compromised through a kernel exploit, though, can't they?

The most secure isolation is provided with physical separation. Second best is VMs. Containers are a distant third.

Re:Why would anyone choose Docker over fat binaries? by 2trill2spill on Sunday October 29, 2017 @01:07PM (#15580126)
> Those solutions still allow the host and all the other containers to be compromised through a kernel exploit, though, can't they?

If I keep my boxes up to date I only need to worry about zero day kernel exploits. So if someone comes along and uses a zero day kernel exploit to escape my FreeBSD jail then they were going to get on the box anyway, because any attacker using a zero day is highly skilled and highly targeted.

> The most secure isolation is provided with physical separation. Second best is VMs. Containers are a distant third.

While I agree that physical isolation is the safest, I don't think it's so cut and dry between containers and VMs. Virtual machines have significantly more attack surface than either Jails or Zones, think of all the emulated devices.

Re:Why would anyone choose Docker over fat binaries? by pmoriarty on Sunday October 29, 2017 @01:19PM (#15580211)
"Virtual machines have significantly more attack surface than either Jails or Zones, think of all the emulated devices."

Nothing prevents you from using jails or zones in your VM.

Re:Why would anyone choose Docker over fat binaries? by 2trill2spill on Sunday October 29, 2017 @01:24PM (#15580241)
> Nothing prevents you from using jails or zones in your VM.

I get that but that's no longer VMs vs containers, Thats VM plus container vs container.

Re:Why would anyone choose Docker over fat binaries? by Spivak on Sunday October 29, 2017 @02:40PM (#15580625)
> Second best is VMs. Containers are a distant third.

I will grant you that containers are harder to isolate since it's same problem as isolating individual processes. But there isn't really a meaningful difference between a kernel exploit and a hypervisor exploit.

Re:Why would anyone choose Docker over fat binaries? by kijiki on Sunday October 29, 2017 @03:09PM (#15580793)
Attack surface of a minimal hypervisor is way smaller than that of an entire kernel.

Take a look at Clear Containers (despite the name, actually using VMs) and their qemu-lite minimal machine type.

Re:Why would anyone choose Docker over fat binaries? by depr on Sunday October 29, 2017 @04:45PM (#15581327)
What makes you say that? VM's get exploited as well http://venom.crowdstrike.com so what makes you think VM's are better than e.g. zones?
Re:Why would anyone choose Docker over fat binaries? by rco8786 on Sunday October 29, 2017 @04:12PM (#15581147)
You argument seems to be "why use Docker when you can do all of these things by hand?". It's kind of the Devops corollary of "why use Java when you could write everything in C?".
Re:Why would anyone choose Docker over fat binaries? by notyourday on Sunday October 29, 2017 @05:20PM (#15581468)
No, my argument is "if you are using docker without understanding what you are doing, you are not only not solving your problem but complicating your stack"

Don't get me wrong I love people doing this. It makes my skills in uncomplicating needlessly complicated systems extremely valuable.

Re:Why would anyone choose Docker over fat binaries? by Spooky23 on Sunday October 29, 2017 @10:39AM (#15579472)
It pushes thinking up to the app/middleware stack and away from server instances.
Re:Why would anyone choose Docker over fat binaries? by notyourday on Sunday October 29, 2017 @11:43AM (#15579701)
The odds are you are running on VMs in AWS, GCS, Azure or even DO. If that's the case, why on earth is your building block not a VM?
Re:Why would anyone choose Docker over fat binaries? by Spivak on Sunday October 29, 2017 @02:50PM (#15580672)
* Multiple machines are a larger attack surface and a larger surface area to get things wrong.

* Overhead. It might be getting smaller but it's certainly still there. Not just the application but all the OS services that are duplicated are extremely wasteful when you're billed for your resources directly.

* Your vendor distributes applications as docker containers.

* Your developers are building and testing in docker.

* Clustered resources are dead simple with swarm. It can obviously be done with VMs but it's work.

* Devs and sysadmins alike enjoy using off-the-shelf services that are maintained by someone else.

Re:Why would anyone choose Docker over fat binaries? by kemitche on Sunday October 29, 2017 @04:11PM (#15581142)
I can run a dozen containers on my laptop a lot more easily than I can run a dozen VMs.
Re:Why would anyone choose Docker over fat binaries? by Spooky23 on Sunday October 29, 2017 @12:42PM (#15579980)
No idea. I’m not advocating that position.

There are enterprise use cases where docker makes sense if the app support people are less impossible to deal with than the SAs. But you don’t have that issue in cloud.

Re:Why would anyone choose Docker over fat binaries? by esteban85 on Sunday October 29, 2017 @06:10PM (#15581744)
clearly you never had to reengineer some crappy code whilst making the current live system operate.

Docker nowadays at least for me is essential for encapsulating st

Re:Why would anyone choose Docker over fat binaries? by pacala on Sunday October 29, 2017 @10:50AM (#15579513)
Extra scenarios:

* Not all our libraries are available in the same ecosystem. We need to mix JVM with C++ with a sprinkle of Python [via jep].

* We run a lot of small variations over the same code base. We'd rather not wait to re-deploy 99% of a fat binary for each run.

Re:Why would anyone choose Docker over fat binaries? by seabrookmx on Sunday October 29, 2017 @02:21PM (#15580522)
Another good point is that Docker's layered filesystem allows for caching that greatly benefits the use case you're describing.

We have an old .net app we pushed to servers via zip files, and the sheer size of the zip ended up being a burden after many deployments. Docker's caching and "docker prune" make things a lot easier.

Re:Why would anyone choose Docker over fat binaries? by dsr_ on Sunday October 29, 2017 @08:59AM (#15579140)
This argument appears to be: when the application is crap, putting it in a container lets me deal with it without getting my hands dirty.

This is probably true, but it isn't good.

Re:Why would anyone choose Docker over fat binaries? by geofft on Sunday October 29, 2017 @09:31AM (#15579213)
Why is it not good? It is in line with the robustness / Worse-is-Better ethos, and importantly, it lets you get on with delivering business value, which is what we're supposed to be doing. (At least in a business context. If you want to rewrite code to perfection on weekends, for fun, so do I, I am all for that, but that's almost never what my employer needs.)
Re:Why would anyone choose Docker over fat binaries? by lightedman on Sunday October 29, 2017 @11:39AM (#15579683)
"Why is it not good?"

Because it still allows the base problem of crap coding practice to proliferate.

Re:Why would anyone choose Docker over fat binaries? by gcb0 on Sunday October 29, 2017 @11:52AM (#15579738)
and don't forget that crap code == insecure code.

but nobody have to worry about it. just start a container the last guy left. /sarcasm

Re:Why would anyone choose Docker over fat binaries? by geofft on Sunday October 29, 2017 @03:49PM (#15581038)
> and don't forget that crap code == insecure code.

I don't think I believe that equality is nearly as neat you'd hope. Unless we're willing to call all code crap code, a lot of projects with well-respected code and development practices have had serious zero days, and we've also found that sandboxing software is highly effective. Insecure code in a secure, well-written sandbox can get you a secure deployment, and you probably want to have your "good" code in a well-written sandbox anyway.

Re:Why would anyone choose Docker over fat binaries? by gcb0 on Sunday October 29, 2017 @08:02PM (#15582292)
zero days and the privilege escalation are a luxury.

bad code is often plaged with injection/sql injection. Which sandbox does an absolute NOTHING to protect you from. After all, it is all within the expected side effects of your code.

Re:Why would anyone choose Docker over fat binaries? by bm1362 on Monday October 30, 2017 @01:18AM (#15583224)
What does this have to do with Docker then?
Re:Why would anyone choose Docker over fat binaries? by gcb0 on Sunday November 05, 2017 @10:59PM (#15633364)
because a flawed argument in defense of containers is that it is safer, since it's harder to escalate priviledges.

my point is that false sense of security makes it even easier for an attacker to use readily available privileges in the badly coded application.

Re:Why would anyone choose Docker over fat binaries? by twic on Sunday October 29, 2017 @01:05PM (#15580119)
This seems to be the main point of the article to me. If your language's toolchain makes it easy to make sufficiently* self-contained 'fat binaries' (like Go or Java), then Docker doesn't add much. If it doesn't, like Ruby or Python, then Docker is very useful.

* 'sufficiently' is doing a lot of work here. Go binaries might still need libc; Java tars-of-jars (or fat jars, if you're confused) still need a JVM, which needs a handful of shared libraries. But those things are relatively stable, generally backward-compatible, and one single big thing (libc or JVM), so it's fairly easy to manage having multiple versions installed anyway. More than zero work? Yes. Less work than managing a Kubernetes or Docker installation? Also yes.

Re:Why would anyone choose Docker over fat binaries? by eeZah7Ux on Sunday October 29, 2017 @10:09AM (#15579361)
Spot on. Both fat binaries and containers very often translate in: "Nobody here cares about security. We deploy opaque blobs that will be unmaintained."