Live data from Hacker News

WTF is a container?

techcrunch.com

21–30 of 262 posts

Re: WTF is a container?

#21
for the love of god - forget docker, use lxc containers - its simple, secure, goes with its own init, cron, and you dont need to do somersaults to achieve simple tasks. Included with linux kernel. Your own isolated linux system. We use lxc in production for over three years, and we have over 3000 of them. No issues whatsoever.

Re: WTF is a container?

#22
Docker is the best thing since sliced bread! VM is much more resource and time consuming.

# We switched our dev/stage env to containers 2 year ago.

# We have made our own standalone app in Docker style. Once again - Easy as pie.

if you are a developer you should add Docker + Docker Compose to you working tools.

Re: WTF is a container?

#23
post #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…

To me it's more like a lightweight virtualization: processes inside containers have no clues that there are others processes running in others containers alongside its own, all of that without eating too much memory (at least well under the amount that virtual machines would use).

Added benefits:

- the 'host' os can be very light and tailored to run Docker and nothing more (cf CoreOS),

- we can design orchestration software that handle containers operations across a herd of lightweight hosts (cf Kubernetes).

The dependencies/recipes thing is more like a tool that enable those higher goals, but again that's just my point of view.

Re: WTF is a container?

#24
post #21

for the love of god - forget docker, use lxc containers - its simple, secure, goes with its own init, cron, and you dont need to do somersaults to achieve simple tasks. Included with linux kernel. Your own isolated linux system. We use lxc in production for over three years, and we have over 3000 of them. No issues whatsoever.

Encouraging to hear. Who do you work for, who has these 3,000 LXC containers in production use? And I'm curious, what orchestration system do you use to manage them? Can you outline your toolset?

Re: WTF is a container?

#25
post #21

for the love of god - forget docker, use lxc containers - its simple, secure, goes with its own init, cron, and you dont need to do somersaults to achieve simple tasks. Included with linux kernel. Your own isolated linux system. We use lxc in production for over three years, and we have over 3000 of them. No issues whatsoever.

You're right that LXC containers have a similar API compared to Docker, but I think developers often underestimate the benefit of the community around a certain technology.

Docker has significantly better documentation, extensions, package management tools, and third-party integrations. Overall, Docker has an incredibly more robust community than LXC or closer competitors like Kubernetes, and those features are just as important as the API for developers.

Re: WTF is a container?

#26
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.

Jails is typically the FreeBSD name for a very similar concept. Linux "copied" (using the term very loosely) the idea, but not the name.

Re: WTF is a container?

#27
post #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…

Docker gives you the building blocks, but that means you have more pieces to arrange and manage. Take a look at Docker Compose if you haven't already, since the Docker CLI only gets you so far when you're creating apps that consist of multiple containers.

I think the best approach for your cert issue is to abstract that into a separate service (nginx is an option, but I'd recommend the Rancher approach below). Yes, that means you have to add another container, but that's just another block in your docker-compose.yml file. Embrace the approach of separating your components into containers and organizing them as a stack. You can easily link containers together, share data volumes, and start/stop individual containers or the stack as a whole.

The problems that you're having are pretty easy to fix with some tooling. Rancher (http://rancher.com/) greatly simplifies the cert issue by allowing you to import certs and provide them to the Rancher loadbalancer service (which you can add to any stack). There's also a LetsEncrypt community catalog template that automatically retrieves and imports certificates to Rancher. There are other open source orchestrators like DCOS, but Rancher is probably the simplest to use, and it's the only one I'm very familiar with. There are SaaS options that you can look into, but I don't have experience with them.

As for the container crashes, it's trivial to automatically restart them. Just pass the --restart=always flag to the Docker run command. You can also add the flag to a docker-compose.yml file.

Re: WTF is a container?

#28
post #21

for the love of god - forget docker, use lxc containers - its simple, secure, goes with its own init, cron, and you dont need to do somersaults to achieve simple tasks. Included with linux kernel. Your own isolated linux system. We use lxc in production for over three years, and we have over 3000 of them. No issues whatsoever.

Doesn't Docker use lxc underneath? [1]

[1] http://unix.stackexchange.com/a/254977/152994

Re: WTF is a container?

#29
post #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…

Same here with docker. The ideas are nice as an application, but it's just a pain in the ass. LXC on the other hand is a breeze.

Re: WTF is a container?

#30
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.

I was running a couple of jails on my FreeBSD server 15 years ago.. Worked like a charm.. But eventually I switched to linux.
Post reply on HN