Hacker News new | past | comments | ask | show | jobs | submit login
[video] Build a working web application using 3 docker containers in 2 minutes (marmelab.com)
61 points by fzaninotto on June 4, 2014 | hide | past | favorite | 18 comments



If I have two pieces of bread and a slice of ham, I can certainly make myself a ham sandwich. The problem, of course, is that what I actually need to make is a roasted chicken.

In other words, it's 2 minutes only if your problem is solvable with Xyz and if you can actually understand that in the first place - and that's not a 2 minute task. So, as great as Docker looks, the "magic in 2 minutes" demos come across as gimmicky and do it more harm than good.


>'...it's 2 minutes only if your problem is solvable with Xyz...'

Isn't that self-evident?

It's a 'Hello World!' example for gaudi, not a guide, tutorial of even a quick start for gaudi much less Docker.


Then by the same extent

    main() { printf("Hello world!\n"); }
is a working native app in C that I built in just 5 seconds. How is it notable?


It's notable if you've never written a C program before, and have no idea what even a minimum valid program would look like.


Yeah, but that's not how an average C program looks like, and the fact that I was able to cook this up in several seconds is absolutely meaningless at best and seriously misleading at worst.


The two have different scopes -- you guys aren't really comparing fairly here.

To someone who's never done it before, "building a working web application with 3 docker containers" -- no matter what that application does or doesn't do -- might sound much harder than it is to get started.

Comparing a ham sandwich to a roasted chicken isn't at all appropriate here -- it's more like comparing a ham sandwich to a gourmet bistro sandwich, where, to a beginner, a ham sandwich is a great starting point, because he learns about the very basics and can expand from there.

The value isn't in the end product here; it's in the first steps toward an end product and teaching people that it's not as befuddling as it might sound. It's not misleading and it's absolutely not meaningless.


>'How is it notable?'

I'm not sure I follow.

Has this been some sort veiled 'Why is this on the front page?' gripe from the start?

Anyway, each is notable as an effective hello world program [1]. A starting point that concisely demonstrates the conventions of the 'language' and provides the opportunity for a new user to intuitively build from it.

Someone can take your C example and change the text, add another print statement then a third leading to a natural discovery of control structures and whatnot.

Someone can take the gaudi example and change the parameters, add a second container then third leading to an natural discovery of configuration and automation functions gaudi is trying to promote itself for.

It's pretty straightforward with the notable difference of a C being a well-established language that wouldn't generate the same interest as something relating to Docker (about a year old) or gaudi (less than a year old).

1: http://en.wikipedia.org/wiki/Hello_world_program


If you are building a PHP/MySQL app, I'm not sure that I would start with docker. Actually, I know I wouldn't start with docker.

Very few apps will ever get to the point where they have millions of users, and even fewer will need to use docker to orchestrate what should amount to < 5 servers (1 proxy, 2 web fronts, 1 cache, 1 db) to start to handle that kind of load.

Once you are at that kind of scale, where you are handling 5+ containers/machines, then it might make sense to look at docker, chef, puppet, etc... but for the rest of us, starting with docker feels like premature optimization for scale that will likely never happen.

The only sensible part of docker at small scale is if you are inside a larger org and you are deploying a lot of apps and you are using docker to simplify deployment (sort of like WAR files in javaland...sort of), but even then for php/mysql a git checkout or rsync works like a champ.


I'm starting a smallish project, using Docker, for two reasons:

- It helps containing all the dependences on my laptop and on the server, to not "pollute" it with things I won't need later.

- It makes it easier to move the whole system around, from my laptop to the cloud.. and to another cloud, etc.

Docker adds complexity as well, so I don't yet know if it's worth it.


The point of docker here is to make your dev environment the same as your production env as much as possible. If you develop on osx and deploy to linux sooner rather than later you will get bitten by env differences.


The biggest advantage of docker I've seen so far is Dokku [1]. If I want to get a dev-instance up and running to show to coworkers (or the client) I just can do "git remote add dokku dokku@example.com && git push dokku master" and share the link with them. And with very little modifications the same can be deployed at Heroku (though I don't use heroku personally).

And if you follow the dokku instructions it's fairly easy to setup, while doing something similar without Dokku but nginx/apache+php/passenger would take a fair amount of time to setup and config to run like that.

[1] https://github.com/progrium/dokku


Docker is not only useful for scaling problems, but also for another reasons such as sharing development environment.


Why not use Vagrant for that?


The heavy-lifting of this seems to be [gaudi](http://gaudi.io/) "a way to describe a system of Docker containers using a simple DSL" and a drag-and-drop interface to generate a script.

gaudi seems to be the perfect tool for setting up database + applications + web containers, but has anyone used it in practice?


Looks like he is generating YAML for fig. Or his tool reads YAML that is just like fig's.


gaudi doesn't generate YAML for fig. DSLs are similar but the goal is not the same.

The difference between fig and gaudi is that in addition to fetch containers from Docker index or via custom Dockerfile gaudi will generate it's own Dockerfile (from templates).

All containers are started with the same base image and are more customizable than Docker index containers


Docker reslly seems to gain a lot of momentum but there is still a need to mature the tooling around it, this looks like a great step in that direction.

Semi-related see also http://blog.liip.ch/archive/2014/06/01/how-i-use-docker-on-o...


The music makes me feel like I'm curing cancer.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: