Live data from Hacker News

WTF is a container?

techcrunch.com

1–10 of 262 posts

Re: WTF is a container?

#3
Putting a little bit more thought into naming things can help newcomers understand these concepts more easily. The word container is too generic, why not call it an 'application jail' or a 'virtual operating system' ?

Another word that is over used in our field is 'context'.

Re: WTF is a container?

#4
post #3

Putting a little bit more thought into naming things can help newcomers understand these concepts more easily. The word container is too generic, why not call it an 'application jail' or a 'virtual operating system' ? Another word that is over used in our field is 'context'.

It's based on the idea of container ships where the contents of every container can vary widely but the external interface for dealing with the containers is always identical. It's a pretty apt metaphor and not too generic, IMHO.

Re: WTF is a container?

#5
I agree that containers (both for shipping and servers) are a great idea. And because I'm tired of always configuring servers, I decided to give it a try some time ago.

I wrapped my IRC client (weechat + glowing-bear) in a Docker container. Oh, not a container though, because I also needed https, which meant I needed either a mechanism to build and update letsencrypt certs in the weird format that weechat expects, or to run an nginx instance in the front (and also somehow get the certs, but that's easier with nginx). So two containers.

And even though there was a ready-made nginx+letsencrypt https reverse proxy container (actually several), I had a huge amount of headaches to get it actually working. Even with the system set up, I occasionally have the container crash with exit status 137 (IIRC), which I've assumed might be because weechat leaks/consumes memory and eventually the host server kernel kills the process. Maybe.

So in my limited experience, comparing Docker containers to shipping containers is a gross simplification. Shipping containers are simple constructions requiring well-defined simple maintenance, while Docker containers seem to be complex thingamabobs that have multiple points of failure.

Re: WTF is a container?

#6
post #2

I've read before on HN about 'don't use docker in production' can anyone elaborate on that for a newbie?

My understanding is that plenty of people do actually use Docker in production, but they use more than just Docker. A docker container isn't quite the same as a VM.

Re: WTF is a container?

#7
post #3

Putting a little bit more thought into naming things can help newcomers understand these concepts more easily. The word container is too generic, why not call it an 'application jail' or a 'virtual operating system' ? Another word that is over used in our field is 'context'.

They were called "jails" long before "containers" became a thing on HN. Somehow "jails" didn't stick, so I'd assume it was even more confusing for newcomers.

Re: WTF is a container?

#8
> The promise behind software containers is essentially the same. Instead of shipping around a full operating system and your software (and maybe the software that your software depends on), you simply pack your code and its dependencies into a container that can then run anywhere — and because they are usually pretty small, you can pack lots of containers onto a single computer.

Already got it wrong. Current containers are exactly the OS and the kitchen sink for running 'printf("hello world")'.

Re: WTF is a container?

#9
post #7
post #3

Putting a little bit more thought into naming things can help newcomers understand these concepts more easily. The word container is too generic, why not call it an 'application jail' or a 'virtual operating system' ? Another word that is over used in our field is 'context'.

They were called "jails" long before "containers" became a thing on HN. Somehow "jails" didn't stick, so I'd assume it was even more confusing for newcomers.

> Somehow "jails" didn't stick

I hear chroot jail tossed around a fair amount.

Re: WTF is a container?

#10
I'm only a beginner, but the analogy that makes sense to me is that containers do for app deployment what npm does for Javascript development. That is, the magical part isn't that Docker simulates an operating system and so on - the magic is that it allows a chunk of logic to precisely declare its dependencies - including on other pieces of logic which declare their own dependencies - and then Docker knows how to (in theory anyway) run the logic in such a way that its dependencies are all satisfied.

And of course the meta-magic is then that there's a public registry of (in theory) solved problems, which one can build on top of by declaring dependencies against them.

I have a pet theory that this "declared dependencies + dependency wrangler + public registry" is a general formula which will keep cropping up as we find new places to apply it.

Post reply on HN