Live data from Hacker News

WTF is a container?

techcrunch.com

251–260 of 262 posts

Re: WTF is a container?

#251
post #239

Earlier quoted context omitted.

> Try to get an application - statically compiled or not - to run across different Linux distributions, and you will see why this matters. Done. A statically compiled application has no other dependencies.

Does it never do DNS lookups? Open files? Do you not want to tie into process management? Logging? Do you really have no dependencies on a functioning locale? Network settings? Are you sure it won't try to exec anything? An application with no other dependencies is exceedingly rare. Small tools, sure. Sometimes. But even then I see people making silly assumptions all the time, which makes using a container as a suita…

> Does it never do DNS lookups?

Yes, it does.

> Open files?

Yes, it does.

> Do you not want to tie into process management?

I don't know what this means.

> Logging?

Yes.

> Do you really have no dependencies on a functioning locale?

What makes a locale "function"?

---

Remember that the my standard C lib or whatever can be statically linked as well. At that point, I'm left with syscalls.

Docker containers depend on syscalls too; it's not like they ship with their own kernel. (If they did, they'd be VMs.)

Re: WTF is a container?

#252

Earlier quoted context omitted.

It's exactly these kinds of issues that add to my impression that containerisation, and Docker in particular, is more of a religion than a solution. I don't hate it per se, but I'm just a bit fed up of people telling me I should be using it without being able to articulate what problem it's going to solve for me. At the moment it feels like just one more thing to learn, and one more moving part, that isn't strictly n…

I wouldn't use it for everything, but whenever I encounter a problem where applications crash or behave weirdly - the problem is with the app, not the container technology. It's not because the problem only manifests itself in a container that the problem is suddenly "docker". And as with every technology, you have to understand it's strength and weaknesses. I use Docker internally and in production with very few iss…

it would help these people to read http://docker-saigon.github.io/post/Docker-Caveats/

Re: WTF is a container?

#253

Earlier quoted context omitted.

I feel that sometimes I'm pro containers, and sometimes I'm very much against them. Docker does make deployments and upgrades very easy once you have the initial infrastructure set up, and you can deploy applications directly from upstream as "units" so that each deployment is exactly what you want; deploying containers helps prevent hosts from differentiating too much. If you have the infrastructure in place to rebu…

More like systemd has been reimplementing docker functionality...

fyi, systemd had nspawn for kernel debugging before docker became a hype

Re: WTF is a container?

#255

Earlier quoted context omitted.

It's exactly these kinds of issues that add to my impression that containerisation, and Docker in particular, is more of a religion than a solution. I don't hate it per se, but I'm just a bit fed up of people telling me I should be using it without being able to articulate what problem it's going to solve for me. At the moment it feels like just one more thing to learn, and one more moving part, that isn't strictly n…

I wouldn't use it for everything, but whenever I encounter a problem where applications crash or behave weirdly - the problem is with the app, not the container technology. It's not because the problem only manifests itself in a container that the problem is suddenly "docker". And as with every technology, you have to understand it's strength and weaknesses. I use Docker internally and in production with very few iss…

Checkout https://github.com/jenkinsci/hyper-slaves-plugin. This plugin will launch your buildjobs as on-demand containers in Hyper.sh, then you don't even need the long-running huge VM!

Re: WTF is a container?

#256
post #224

Earlier quoted context omitted.

All of your requirements can be satisfied with properly configured VMs.

Including total disk space consumed on the host? I can't see how. Containers are by definition far lighter.

It depends on what you build into your containers. Your customers will need storage at some point, unless they're just using the containers as processing engines. You'd also be surprised at how lean you can built a VM with Linux (or one of the BSDs) as the OS.

Re: WTF is a container?

#257
post #154

Earlier quoted context omitted.

Dynamic libraries (in the C/C++ sense) only scratch the surface. Containers give you your own file system namespace (among other namespaces), which means all of the files that make up your complicated application unit can be put together and work together in isolation, separate from the machine's main file system.

What advantages do file system namespaces have over separating by directories and users?

Basically if you're a shit sysadmin, you don't have to bother learning anything or working hard.

This is absolutely fine if you intend to remain a shit sysadmin. Go nuts with Docker. The 21st century will be waiting for you when you're done.

So will 19 fucking 60 because nothing's fucking changed.

Re: WTF is a container?

#258

Earlier quoted context omitted.

Hey chewchew you seem to be knowledgeable on docker-compose. What's the easiest way to get a .yml on a cloud server somewhere and let it assemble it assemble the containers for you? Also, do you know where containers set environment variables? The official Postgres makes available something like PG_PORT_3542 and u can just refer to it from another container. Where I can't seem to do the same with the Redis one...

The absolute easiest is probably Docker Cloud. I've checked it out but haven't really used it much. It's still relatively immature but if you just want to deploy and forget something simple, this is probably the way to go. If you want to use your own Linux host, then the simplest way would probably just be to SSH into the box, git pull, and run "docker-compose build && docker-compose up". Setting environment variable…

Thanks chewchew so much win in this reply. I use Heroku a lot and was wondering if there is a "believable" alternative using Docker.

Re: WTF is a container?

#259

Earlier quoted context omitted.

This is interesting. I'd been considering mounting drives for persistence of stateful data from containers. Let's say I want to run a Wordpress hosting service. In my ideal world, I deploy an "immutable" container for each customer, i.e. everyone gets an identical container with Wordpress, Nginx, MySQL etc. So what to do with state info, like configs and the MySQL data files? I'm thinking of mounting a drive at the s…

In your example -- assuming 20 different blogs/customers -- you'd be running 20 separate instances of MySQL (plus 20 nginx instances plus 20 php-fpm instances plus ...)? Now, let me first say that I haven't come anywhere close to even touching containers and most of what I know about them came from this HN thread so please forgive me if I'm missing something... I, personally, would rather only have a single MySQL ins…

You're quite right, of course.

In my scenario, I want to provide a package for easy download and deployment. Each customer will indeed run their own mysql db, if they choose to self-host the containerised software.

I plan to offer a paid hosting service, where I'll rent bare metal in a data centre, onto which I'll install management and orchestration tools of my choosing.

An identical container for any environment is my ideal, since this will make maintenance, testing, development etc simpler. Consequently each customer hosted in my data centre will, in effect, get their own mysql instance.

This way the identical software in each container will be dumb, and expect an identical situation wherever it's installed.

Now, in reality, I may do something clever under the hood with all those mysql instances, I just haven't worked out what yet :)

Actually it will probably be Postgres, but I'll use whatever db is most suited.

So yes, some duplication and wasted disk space, but that's a trade off for simplified development, testing, support, debugging, backups, etc.

Re: WTF is a container?

#260
post #155

The reason people don't get the advantage of Docker is because there is a weird (and in my opinion stupid) tabboo against putting all of your deps in one container. This is about 10-100X easier than trying to compose a bunch of containers. Not everyone can do that, but plenty of people could. Except they don't not because of some actual ops requirement (in many cases) but because they don't want someone to say they d…

no it's worse now. There's also all the PKI required compounding the pain and suffering.

Phusion baseimage-docker seems to help.

Worth nothing Atlassian stepped back and does scaleout approach using regular cloud instead of container orchestration technology. https://www.atlassian.com/company/events/summit/2016/watch-s...

Also worth noting you can take away all the PKI and registry pain and have instant scaling with the registry by using cloud store for registry and having Jenkins gatekeeper be the only writer, all dev and production nodes use the same store only readonly.

Post reply on HN