
[video] Build a working web application using 3 docker containers in 2 minutes - fzaninotto
http://marmelab.com/blog/2014/06/04/demo-symfony-with-docker-and-gaudi.html
======
huhtenberg
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.

~~~
incision
_> '...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.

~~~
huhtenberg
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?

~~~
jeffbr13
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.

~~~
huhtenberg
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.

~~~
toki5
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.

------
programminggeek
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.

~~~
aemadrid
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.

~~~
larrybolt
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](https://github.com/progrium/dokku)

------
jeffbr13
The heavy-lifting of this seems to be
[gaudi]([http://gaudi.io/](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?

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

~~~
manuquentin
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

------
lsmith77
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...](http://blog.liip.ch/archive/2014/06/01/how-i-use-docker-on-
os-x.html)

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

